View previous topic :: View next topic |
Author |
Message |
sonaarjun Beginner
Joined: 30 Aug 2004 Posts: 8 Topics: 4
|
Posted: Thu Sep 09, 2004 8:07 am Post subject: Any Files Avail for Retrieving A System DATE & TIME |
|
|
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
-------------------------------------------------------------------------------------
SUCCESS CONSISTS OF DAILY LITTLE ACHIEVEMENTS |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Sep 09, 2004 1:40 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
sonaarjun Beginner
Joined: 30 Aug 2004 Posts: 8 Topics: 4
|
Posted: Tue Sep 14, 2004 1:37 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Tue Sep 14, 2004 6:15 am Post subject: |
|
|
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 |
|
 |
sonaarjun Beginner
Joined: 30 Aug 2004 Posts: 8 Topics: 4
|
Posted: Fri Oct 01, 2004 3:31 am Post subject: |
|
|
thanks kolusu for your program. |
|
Back to top |
|
 |
|
|