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

Need REXX To Convert SMF Timestamps To Local Time


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

New User


Joined: 14 Oct 2009
Posts: 10
Location: A Florida Cubicle...

PostPosted: Wed Oct 14, 2009 5:42 am
Reply with quote

Looking for a way to convert a SMF date and time stamp from GMT/UTC to local time. I have coded a procedure which determines the time zone and determines hours to be added or subtracted to the GMT time in the SMF record to calculate the local time. The SMF date is in mm/dd/yy format and the SMF time is in hh:mm:ss format. I can calculate the # of seconds since midnight. Problem occurs when SMF time plus or minus timezone hours spans midnight. (ex. 02:00:00 - 4 hours = 22:00 the previous day). Any suggestions would be appreciated.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 14, 2009 5:55 am
Reply with quote

If SMF minus offset is negative, add 24 to result. If SMF plus offset is greater than 24, subtract 24 from result.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 14, 2009 11:40 am
Reply with quote

How do you get the REXX to process the SMF records, as usually they are created as VBS, which REXX is unable to process.
Back to top
View user's profile Send private message
Deborah Shugerts

New User


Joined: 14 Oct 2009
Posts: 10
Location: A Florida Cubicle...

PostPosted: Wed Oct 14, 2009 5:21 pm
Reply with quote

expat wrote:
How do you get the REXX to process the SMF records, as usually they are created as VBS, which REXX is unable to process.


Copy the VBS records from the SMF dump to RECFM=VB using ICETOOL/DFSORT.

//CONSEL2 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//RAWSMF2 DD DSN=HLQ1.HLQ2.SMF11902,DISP=SHR
//CONSMF2 DD DSN=HLQ1.HLQ2.SMF11902.VB(+1),DISP=(NEW,CATLG),
// DCB=(RECFM=VB,LRECL=32756,BLKSIZE=0),UNIT=SYSDA,
// SPACE=(1,(300,100),RLSE)
//CON1CNTL DD DSN=HLQ1.HLQ2.CONTROL(CONTRL02),DISP=SHR
/*
//TOOLMSG DD SYSOUT=*
//REPORT DD SYSOUT=*
//TOOLIN DD *

CONTRL02 member:

OPTION DYNALLOC,VLSHRT,SPANINC=RC4
INCLUDE COND=(6,1,BI,EQ,119,AND,23,2,BI,EQ,2)
SORT FIELDS=(11,4,PD,A,7,4,BI,A)
Back to top
View user's profile Send private message
Deborah Shugerts

New User


Joined: 14 Oct 2009
Posts: 10
Location: A Florida Cubicle...

PostPosted: Thu Oct 15, 2009 3:55 am
Reply with quote

Thanks so much. That worked. Making things harder than they needed to be !
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