Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Pls can you explain this rexx about CVT info?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Pls can you explain this rexx about CVT info?
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

Site Director


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

PostPosted: Mon Jul 26, 2010 10:03 am    Post subject:
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:
http://www-03.ibm.com/systems/z/os/zos/bkserv/r11pdf/

This "redbook" will also be quite useful
http://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    Post subject:
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

Site Director


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

PostPosted: Mon Jul 26, 2010 10:34 am    Post subject: Reply to: Pls can you explain this rexx about CVT info?
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    Post subject:
Reply with quote

Hello,dick

http://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: 2429
Location: Netherlands, Amstelveen

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

Look for :

MVS Data Areas

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

Site Director


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

PostPosted: Mon Jul 26, 2010 7:46 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Jul 26, 2010 9:26 pm    Post subject: Reply to: Pls can you explain this rexx about CVT info?
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts Need info with DBRC recovery ashek15 IMS DB/DC 0 Mon Jan 23, 2017 6:43 am
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us