I was a DBA not a sysprog so I asked my sysprog to changed the JES exit to support the specification of date and time as part of the new output dataset name. This allows me to do such things as managing the deletion of obsolete backups etc by dataset creation date and time instead of GDG generations. The example JCL is given below :
//***************************************************************** //* //* ASAV - SAVING DATABASE TO DISK WITH DATE AND TIME STAMP //* //***************************************************************** //* //ASAV PROC ENV=PROD, // DB=P00, // V=03, // SVC=1ST // SET D=D&LYYMMDD // SET T=T&LHHMMSS //* //ASAV EXEC PGM=ADARUN,REGION=6M //STEPLIB DD DSN=SYS3.ADABAS.&ENV..V&V..LOAD,DISP=SHR //DDASSOR1 DD DSN=SYS3.ADABAS.&ENV..&DB..ASSO,DISP=OLD //DDDATAR1 DD DSN=SYS3.ADABAS.&ENV..&DB..DATA,DISP=OLD //DDWORKR1 DD DSN=SYS3.ADABAS.&ENV..&DB..WORK,DISP=OLD //DDRLOGR1 DD DSN=SYS3.ADABAS.&ENV..&DB..RLOG,DISP=SHR //DDRLOGM1 DD DSN=SYS3.ADABAS.&ENV..&DB..RLOGM,DISP=SHR //DDSAVE1 DD DISP=(NEW,CATLG,DELETE), //*DDSAVE1 DD DISP=(NEW,CATLG,CATLG), // DSN=SYS3.ADABAS.&ENV..&DB..BK.&D..&T, // DATACLAS=MULTIVOL, // SPACE=(CYL,(1669,0417),RLSE),UNIT=SYSDA //SYSUDUMP DD SYSOUT=D //DDDRUCK DD SYSOUT=* //DDPRINT DD SYSOUT=* //DDCARD DD DSN=SYS3.ADABAS.COMMON.PARMS(RUNSAV),DISP=SHR // DD DSN=SYS3.ADABAS.&ENV..&DB..PARMS(RUNMULTI),DISP=SHR // DD DSN=SYS3.ADABAS.COMMON.PARMS(SVC&SVC),DISP=SHR //DDKARTE DD DSN=SYS3.ADABAS.COMMON.PARMS(SAVEDB),DISP=SHR This also allowed me to move datasets from disk to multi-file cart. by running a SAS program through an IDCAMS output and generate the JCL to move the selecteddatasets. The short answer is YES it can be done in batch job not just sarted task. Joseph Tan On Thu, Apr 9, 2009 at 3:38 AM, Roger Bolan <roger.bo...@infoprint.com>wrote: > The short answer, from the JCL Reference, says this: > You cannot use system symbolsexcept for &SYSUID, in batch JCL. > > The other system symbols you see with the D SYMBOLS command, are not for > batch > JCL, but only for TSO logon procs or started tasks. > --Roger > > > > > > "Barkow, Eileen" > <ebar...@doitt.nyc. > GOV> > To > Sent by: IBM IBM-MAIN@bama.ua.edu > Mainframe > cc > Discussion List > <ibm-m...@bama.ua.e > Subject > du> Re: Using system variables in JCL > > > 04/08/2009 11:10 AM > > > Please respond to > IBM Mainframe > Discussion List > <ibm-m...@bama.ua.e > du> > > > > > > > look in the mvs jcl reference manual > > .4 Using System Symbols and JCL Symbols > > System symbols and JCL symbols are character strings that represent > variable information in JCL. They allow you to modify JCL statements in > a job easily. A symbol-defining string is limited to eight characters, > not including an identifying ampersand. > This section: > > Describes system symbols and JCL symbols and the differences between > them > Explains how to define JCL symbols > Shows how to code system symbols and JCL symbols. > 5.4.1 What are System Symbols? > 5.4.2 What are JCL Symbols? > 5.4.3 Coding Symbols in JCL > 5.4.4 Determining Equivalent JCL > 5.4.5 Examples of Defining and Coding Symbols in JCL > 5.4.6 Using Symbols in Nested Procedures > 5.4.7 Examples of Coding Symbols in Nested Procedures > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On > Behalf Of Johnson Jr., Donald E > Sent: Wednesday, April 08, 2009 12:38 PM > To: IBM-MAIN@bama.ua.edu > Subject: Using system variables in JCL > > I have had someone ask me a question that I could not answer directly, > and hope someone can point me in the right direction. > > > > How can I determine what system variables are available for use in JCL > DSN statements? For example, I know that I can use &SYSUID, but it seems > that other variables like &JOBNAME, &YYMMDD, &DATE are not valid. > > > > Is there somewhere I can look to use these other variables, or to find > out what is available? > > > > Thanks! > > Don > > > > Don Johnson > > CA > > Sr. Support Engineer > > > > This e-mail and any files transmitted with it are for the sole use of > the intended recipient(s) and contain information that may be privileged > and confidential. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the intended recipient of > this e-mail, please delete this e-mail and any files transmitted with it > and notify the sender immediately. > > > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > > > > > _____________________________________________________________________________ > "This message and any attachments are solely for the intended recipient and > may contain confidential or privileged information. If you are not the > intended recipient, any disclosure, copying, use, or distribution of the > information included in this message and any attachments is prohibited. If > you have received this communication in error, please notify us by reply > e-mail and immediately and permanently delete this message and any > attachments. Thank you." > _____________________________________________________________________________ > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html