IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Pls can you explain this rexx about CVT info?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Mon Jul 26, 2010 9:22 am
Reply with quote

/*REXX*/
/* GET JOBID: CURRENT_TCB->JSCB->SSIB */
NUMERIC DIGITS 24 ;
CVTPTR=STORAGE(10,4) /*CVT*/
PSATCB=STORAGE(D2X(C2D(CVTPTR)),4)
CURRTCB=STORAGE(D2X(C2D(PSATCB)),4)
TCBJSCB=STORAGE(D2X(C2D(CURRTCB)+X2D(B4)),4)
JSCBSSIB=STORAGE(D2X(C2D(TCBJSCB)+X2D(13C)),4)
SSIBJBID=STORAGE(D2X(C2D(JSCBSSIB)+X2D(C)),8)
SAY 'JOBID='SSIBJBID

Dears,I know this pgm is about getting the jobid of corrent job,but can anyone explain the step in detail? I'm always confused about the cvt table.

for example:

CVTPTR=STORAGE(10,4),get the cvt pointer,the length is 4,offset is 10 in hex.but form the z/os data area books,offset 10 is CVT buffer.

16 (10) ADDRESS 4 CVTBUF - ADDRESS OF THE
BUFFER OF THE
RESIDENT CONSOLE
INTERRUPT ROUTINE

thanks in advance...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 26, 2010 10:03 am
Reply with quote

Hello,

That code "chases control blocks".

To understand the code, you need to learn about "mvs data areas" which can be found near the bottom of the linked manuals here:
www-03.ibm.com/systems/z/os/zos/bkserv/r11pdf/

This "redbook" will also be quite useful
www.redbooks.ibm.com/redbooks/pdfs/sg247717.pdf

All the code is step from one memory location to the next until it arrives at the jscb where it retrieves the jobname.
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Mon Jul 26, 2010 10:27 am
Reply with quote

thanks,dick.

you are always very warmhearted...

I'll read these books!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 26, 2010 10:34 am
Reply with quote

You're welcome - good luck icon_smile.gif

d
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Mon Jul 26, 2010 11:52 am
Reply with quote

Hello,dick

www.redbooks.ibm.com/redbooks/pdfs/sg247717.pdf

this book is about jes3,I 'm afraid I ca't get the infor which I want to know icon_confused.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Jul 26, 2010 12:21 pm
Reply with quote

Look for :

MVS Data Areas

5 volumes in total.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 26, 2010 7:46 pm
Reply with quote

Hi Victor,

Quote:
this book is about jes3,I 'm afraid I ca't get the infor which I want to know
My bad - i sent the wrong redbook link icon_redface.gif Time permitting, i'll look for another. I liked the diagrams and wasn't paying proper attention. . .

In the first link, closer to the bottom are multiple links to info MVS Data Areas. Look for:

z/OS V1R11.0 MVS Data Areas, Vol 1 (ABEP-DCCB) - April 2010 1.92
z/OS V1R11.0 MVS Data Areas, Vol 2 (DCCD-IEFDOKEY) - April 2010
z/OS V1R11.0 MVS Data Areas, Vol 3 (IEFDORC-ISGYQCBP) - April 2010
z/OS V1R11.0 MVS Data Areas, Vol 4 (ISGYQUAA-MCHEAD) - April 2010
z/OS V1R11.0 MVS Data Areas, Vol 5 (MCSCSA-SNAPX) - April 2010
z/OS V1R11.0 MVS Data Areas, Vol 6 (SPD-XTLST) - April 2010
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Jul 26, 2010 9:26 pm
Reply with quote

Quote:
CVTPTR=STORAGE(10,4),get the cvt pointer,the length is 4,offset is 10 in hex.but form the z/os data area books,offset 10 is CVT buffer.

16 (10) ADDRESS 4 CVTBUF - ADDRESS OF THE
BUFFER OF THE
RESIDENT CONSOLE
INTERRUPT ROUTINE


CVTPTR is a pointer -TO- the CVT control block, but you cite the contents of the actual control block.

The starting point, at real address 0, is actually mapped by the PSA. They do not show it in your example, because the PSA is always at location 0. So:

PSAptr = 0x
CVTptr = PSAptr +10x
CVTBUF = CVTptr +10x
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Thu Aug 19, 2010 9:04 am
Reply with quote

• z/OS BCP views the first 4 KB of central storage as a control block called the Prefixed
Save Area (PSA). Within the PSA is the hardware's FLC area.
• Imbedded within this fixed low core area is the pointer to the Communications Vector
Table (CVT).
• The CVT can be used to locate representing control blocks such as the Address Space
Control Block (ASCB) and the Unit Control Block (UCB).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top