IBM REXX Question:
Download Questions PDF

How to access data in control blocks such as jobname?


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

/* 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 */

Download IBM REXX Interview Questions And Answers PDF

Previous QuestionNext Question
How to access data held on the JES spool?How to find or access the current level of a GDG?