How to assign System Date/Time to a parameter in a JCL pgm?
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 7
- Joined: Tue Apr 14, 2009 9:01 pm
- Location: Kolkata
How to assign System Date/Time to a parameter in a JCL pgm?
How to assign System Date/Time to a parameter in a JCL program?
Example:
// SET TSTAMP=<system date/time>
// EXEC PGM=IEFBR14
// DD DSN=MY.PS.&TSTAMP,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800),
// SPACE=(TRK,(1,1))
How to assign system date/time to TSTAMP in this JCL?
Thanks in Advance!!!
Narinder.
Example:
// SET TSTAMP=<system date/time>
// EXEC PGM=IEFBR14
// DD DSN=MY.PS.&TSTAMP,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800),
// SPACE=(TRK,(1,1))
How to assign system date/time to TSTAMP in this JCL?
Thanks in Advance!!!
Narinder.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Creating the PS with current date as a qualifier
Following code will generate a sequential file (PS) with current date as a qualifier.
-> File XXX.XXX.XXX.DATE080205 will get created
Code: Select all
//CURDATE JOB (XXXX,XXX),'RUNJCL',CLASS=S,MSGCLASS=S,
// NOTIFY=&SYSUID,REGION=4096K
//STEP00 EXEC PGM=EZACFSM1
//SYSOUT DD SYSOUT=(*,INTRDR)
//SYSIN DD DATA,DLM=@@
//CURDATEC1 JOB (xxxx,xxxx),'RUNJCL',CLASS=S,MSGCLASS=S,
// NOTIFY=&SYSUID,REGION=4096K
//STEP01 EXEC PGM=IEFBR14
//SYSUT2 DD DSN=XXX.XXX.XXX.DATE&LYYMMDD,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,RECFM=FB,LRECL=80,
// SPACE=(CYL,(1,1),RLSE)
@@
Last edited by Natarajan on Fri Apr 17, 2009 10:21 am, edited 1 time in total.
Natarajan
Chennai
Chennai
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
-
- Member
- Posts: 7
- Joined: Tue Apr 14, 2009 9:01 pm
- Location: Kolkata
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Hi Narinder,
If so then you can use the job from Natarajan after changing thisto
If so then you can use the job from Natarajan after changing this
Code: Select all
//SYSUT2 DD DSN=XXX.XXX.XXX.DATE&LYYMMDD,
Code: Select all
//SYSUT2 DD DSN=XXX.XXX.XXX.D&LYYMMDD,
Regards,
Anuj
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Re: Creating the PS with current date as a qualifier
I would like to believe it was written mistakenly...Natarajan wrote:File DRAL.CP000000.FFB.DATE080205 will get created
Regards,
Anuj
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Your Job won't work the way you have coded it, you are missing the basic "needs" of INTRDR - The INTRDR statement specifies the characteristics of all JES2 internal readers that are used to submit batch jobs. An internal reader is a special SYSOUT data set that other programs can use to submit jobs, control statements, and commands to JES2. Jobs that allocate internal reader and time-sharing users use the internal readers to submit jobs.
Suggest yousearch a bit on INTRDR.
Suggest yousearch a bit on INTRDR.
Regards,
Anuj
Anuj
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page