MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any Files Avail for Retrieving A System DATE & TIME

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sonaarjun
Beginner


Joined: 30 Aug 2004
Posts: 8
Topics: 4

PostPosted: Thu Sep 09, 2004 8:07 am    Post subject: Any Files Avail for Retrieving A System DATE & TIME Reply with quote

Hi folks,
In jcl we can get the user id by giving the system file like "&sysuid".
like that is that possible to have a system file to have a system time and date, which can be get to the jcl by giving a name like &sysuid.

if it's so please tell me that system file name and where it resides and which format it may store in to the file.

-k.arjun singh Question
-------------------------------------------------------------------------------------
SUCCESS CONSISTS OF DAILY LITTLE ACHIEVEMENTS
Back to top
View user's profile Send private message Send e-mail
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Sep 09, 2004 1:40 pm    Post subject: Reply with quote

The only pre-defined JCL variable that is available during runtime is &SYSUID, other than any others that may be provided by your job scheduling software. Any other variables must be defined and assigned a value by you, the developer. You can use the SET statement to define a variable:
Code:

//MYJOB JOB (....),CLASS=X,MSGCLASS=X
//*
// SET THEDATE=04253
//*
//STEP1 EXEC PGM=MYPROG,PARM='&THEDATE'
//*

Of course, a SET statement may be defined in an external library, and then referenced by an INCLUDE statement:
Code:

//MYJOB JOB (....),CLASS=X,MSGCLASS=X
//*
// INCLUDE MEMBER=THEDATE
//*
//STEP1 EXEC PGM=MYPROG,PARM='&THEDATE'
//*

where an external library such as 'SYS1.PROCLIB' contains the member THEDATE, which is this one record:
// SET THEDATE=04253


Now, there is a commonly used utility program EZACFSM1 that will convert the system's Dynamic System Symbols into their actual values. These values can then be used to build the JCL before it is submitted.

For a discussion on using EZACFSM1, check here:

http://www.mvsforums.com/helpboards/viewtopic.php?t=2101&highlight=ezacfsm1

For a table of the standard Dynamic System Symbols, check here:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2

Otherwise, you can use any utility or language to build the JCL with the appropriate date/time values, which can then be submitted.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Sun Sep 12, 2004 7:46 pm    Post subject: Reply with quote

Sonaarjun,

Besides the methods suggested by SUPERK, you can also use SORT to get the current date and time. if your shop has DFSORT then check this link which explains the usage of date on INREC & OUTREC statement.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA00/3.8?DT=20031124143823

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA00/3.14?DT=20031124143823

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sonaarjun
Beginner


Joined: 30 Aug 2004
Posts: 8
Topics: 4

PostPosted: Tue Sep 14, 2004 1:37 am    Post subject: Reply with quote

Thanks to superk and kolusu for clearing my doubt.

kolusu please explain me by writing one simple program using 'inrec' statement. this will help me lot.

-K.Arjun singh
-----------------------------------------------------------------------------------------------
LIFE IS A SHORT STORY MAKE IT A LONG HI-STORY!!!!!!!!!!
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue Sep 14, 2004 6:15 am    Post subject: Reply with quote

Sonaarjun,

The following JCL will give you the current date and current time.
Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SORTIN    DD *
DUMMY RECORD   
//SORTOUT   DD SYSOUT=*
//SYSIN     DD *
  SORT FIELDS=COPY
  INREC FIELDS=(DATE1,X,TIME)
/*

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sonaarjun
Beginner


Joined: 30 Aug 2004
Posts: 8
Topics: 4

PostPosted: Fri Oct 01, 2004 3:31 am    Post subject: Reply with quote

thanks kolusu for your program.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group