Thank you Mark.  Below is the latest on that I have and it appears
almost identical. (-:

Anyway, my original question was meant to be more like, "Wouldn't it be
nice if there were some documentation that explained things like this in
more detail, that was easy to read, and indexed and cross indexed every
which way from Sunday?"  Maybe with some examples in Rexx and Assembler,
even Cobol or PL/1.  My question was if others think such a thing would
be as helpful as I think such a thing would be?

The current method of finding things you need are to search the Data
Areas docs, search through source like SHOWZOS, Google, or ask someone
else if they have any examples or remember which control block it is in.

Regards,
Lindy


/* Note CVTTZ is depreciated */
getZONE: Procedure                                                   
                                                                     
CVT = c2d(storage(10,4))              /* psa+10 -> cvt */            
CVTEXT2 = c2d(storage(d2x(cvt+328),4)) /* cvt+148 -> cvtext2 */      
cvtldto = C2d(storage(d2x(cvtext2+56),8),8)  /* cvt+38 -> cvtldto */ 
                                                                     
absldto = Abs(cvtldto)                                               
hours   = absldto % x2d('D693A400000')                               
minutes = (absldto % x2d('3938700000')) // 60                        
zone    = Right(hours,2,"0" )"."Right(minutes,2,"0" )                
If cvtldto < 0 Then Do                                               
   zone = "-"zone                                                    
End                                                                  
Else Do                                                              
   zone = "+"zone                                                    
End                                                                  
                                                                     
Return zone                                                          

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Mark L. Wheeler
Sent: 6. tammikuuta 2008 4:04
To: [email protected]
Subject: Re: z/OS and VM Control Blocks

> 4) What is the proper way to get the CVT time zone?  What is obsolete
> and what is the way to do it nowadays?

Lindy, I received this REXX code from the TSO-REXX mailing list a few
weeks
ago...

/* Courtesy Lionel B Dyck <[EMAIL PROTECTED]>, via the TSO-REX
   mailing list */

/* ===========================================================
|| We're gonna have a big number
*/
NUMERIC DIGITS 21

/* ===========================================================
|| Get current CVTLDTO
||   (Local Date Time Offset in STCK format))
*/
cvt     = C2d( Storage( D2x( 16 ), 4 ) )
cvttz   = C2d( Storage( D2x( cvt + 304 ), 4 ) )
cvtext2 = C2d( Storage( D2x( cvt + 328 ), 4 ) )
cvtldto = C2d( Storage( D2x( cvtext2 + 56 ), 8 ), 8 )

/* ===========================================================
|| Calc the current offset in hours and minutes
||    (work with absolute)
*/
absldto = Abs( cvtldto )
hours   = absldto % x2d("D693A400000" )
minutes = ( absldto % x2d("3938700000") ) // 60
/* ===========================================================
|| Correction to Round to nearest hour
*/
If minutes <> "00"  Then Do
   If minutes > 30 Then
       hours = hours + 1
   /* minutes = 00 */
End

/* ===========================================================
|| Format to ANSI standard X3.51-1975
*/
zone    = Right( hours, 2, "0" )Right( minutes, 2, "0" )
IF cvtldto < 0 THEN DO
  zone      = "-"zone
END
ELSE DO
 zone = "+"zone
END

/* ===========================================================
|| Reset
*/
NUMERIC DIGITS

RETURN zone



Best regards,
Mark Wheeler, 3M Company

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to