ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

call stack

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • call stack

    Hi

    Hw to see the call stack to see the various levels of the programs.

  • #2
    Re: call stack

    During the running of a program you can use "System Request", usually Shift-Esc to work with the job. Then take option 11 to display the call stack. pressing F11 will give you various levels of detail here.

    If its a batch job (or another users job) then do a WRKACTJOB or WRKUSRJOB and put 5 against the job in question. The options are then the same as above.

    hth

    Mike
    You don't stop playing games because you get old, You get old because you stop playing games!

    Comment


    • #3
      Re: call stack

      or run this

      PHP Code:
      ~
           
      d GetCaller       PR                  Extpgm('QWVRCSTK'
           
      d                             2000 
           d                               10I 0 
           d                                8    
      CONST 
           
      d                               56 
           d                                8    
      CONST 
           
      d                               15 

           d 
      Var             DS          2000 
           d  BytAvl                       10I 0 
           d  BytRtn                       10I 0 
           d  Entries                      10I 0 
           d  Offset                       10I 0 
           d  EntryCount                   10I 0 
           d VarLen          S             10I 0 Inz
      (%size(Var)) 
           
      d ApiErr          S             15 
           d Outdata         S             30 

           d JobIdInf        DS 
           d  JIDQName                     26    Inz
      ('*'
           
      d  JIDIntID                     16 
           d  JIDRes3                       2    Inz
      (*loval
           
      d  JIDThreadInd                 10I 0 Inz(1
           
      d  JIDThread                     8    Inz(*loval

           
      d Entry           DS           256 
           d  EntryLen                     10I 0 
           d  PgmNam                       10    Overlay
      (Entry:25
           
      d  PgmLib                       10    Overlay(Entry:35
           

           c                   CallP     GetCaller
      (Var:VarLen:'CSTK0100':JobIdInf 
           c                             
      :'JIDF0100':ApiErr
           
      c                   Do        EntryCount 
           c                   
      Eval      Entry = %subst(Var:Offset 1
           
      c                   eval      outdata = %subst(entry:1:30
           
      c     outdata       dsply                   reply             1 
           c                   
      Eval      Offset Offset EntryLen 
           c                   Enddo 
           c                   
      Eval      *InLR = *on 
      Attached Files
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment

      Working...
      X