How do I access data in control blocks such as jobname?



How do I access data in control blocks such as jobname?..

Answer / shakila vinayagam

Use the Storage() function to extract the data from control
blocks.

/* REXX Get taskname from TCB */
cvt = storage(10,4) /* FLCCVT-PSA data area */
tcbp = storage(d2x(c2d(cvt)),4) /* CVTTCBP */
tcb = storage(d2x(c2d(tcbp)+4),4)
tiot = storage(d2x(c2d(tcb)+12),4) /* TCBTIO */
say strip(storage(d2x(c2d(tiot)),8)) /* TIOCNJOB */

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More REXX Interview Questions

How to code the db2 queries using rexx, and also plz send some link and examples using db2 queries?

0 Answers  


How do I access data in control blocks such as jobname?

1 Answers  


i'm getting error while editing macro, its not even entering into the macro, getting error like 31 *-* "EDIT DATASET('"DSN"("MEM")') MACRO("CHGLINE")" +++ RC(-3) +++ ? any idea why?

1 Answers  


How do I access data held on the JES spool?

3 Answers   TCS,


I am new to rexx db2 ,can anyone help me by expalinin how to code the db2 queries using rexx,and also plz send some link and examples using db2 queries.

3 Answers  


I executed one job and I forget to save the final JCL. But took an XDC from SPOOL. Now I want to recover the JCL from XDC dataset. Is there any process to do this?. (Manually it takes a lot of time). Is there

0 Answers  


Can I combine uni-REXX with a compiled language in my application? What application programming interfaces are available? For example, can I share variables between uni-REXX and a compiled language?

0 Answers  


have you already used rexx - even for limited purposes? Do you need to maintain a high level of productivity during your transition to unix?

0 Answers   IBM,


How do I Run My Rexx Exec.?

2 Answers  


I'm new to rexx. How to code rexx in jcl to read in a lpar cpu usage file and select 1. date, time 2. some system names 3. cpu usage for each system. The input file has hourly reporting. The output file (CSV)is for excel use. Run in batch mode. Output in FB.

1 Answers  


what is uni-rexx?

0 Answers   IBM,


how to access data in control blocks such as jobname?

0 Answers   IBM,


Categories