View previous topic :: View next topic
|
Author |
Message |
Arunkumar Chandrasekaran
New User
Joined: 01 Jun 2010 Posts: 63 Location: India
|
|
|
|
Hi , I recently came to know that we can use sysmbolic parameters in SET statements
to get DATE , DAY , TIME etc...
I tried the below jcl step
Code: |
// SET DATE=D&YYMMDD.
//IEFBR14 EXEC PGM=IEFBR14
//NEWDS DD DSN=MAGT.&DATE..CNTL,DISP=(,CATLG),
// SPACE=(TRK,(1,1,1)),BLKSIZE=0,LRECL=80 |
and MAGT.D121204.CNTL is created.When I tried to get the day (tuesday)
I am getting JCL error.Here is my jcl for DAY
Code: |
// SET DAY=D&ZDAY.
//IEFBR14 EXEC PGM=IEFBR14
//NEWDS DD DSN=MAGT.&DAY..CNTL,DISP=(,CATLG),
// SPACE=(TRK,(1,1,1)),BLKSIZE=0,LRECL=80 |
What is wrong with this?? also please let me know the list of parameters like this ( ZJOBID, ZJOBNAME).Please help.
Previously i used internal reader to get this type of data. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
You appear to be confusing JCL symbolics with ISPF system variables. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You have to show what error you got. Did you mean &WDAY? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Why do you have a period at the end of the SETs
"// SET DATE=D&YYMMDD."and "// SET DAY=D&ZDAY." ? |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 582 Location: London
|
|
|
|
Use REXX or suchlike to generate into a PDS member the JCL with the SET statements
e.g.
generate these statements into PDS.MEMBER.LIB(@RUNDATE) with the REXX which can get the date and time..
// SET RUNDATE=11318
// SET RUNTIME=1638
then in the execution JCL..reference it as follows using the INCLUDE
//JCL JCLLIB ORDER=(PDS.MEMBER.LIB)
// INCLUDE MEMBER=@RUNDATE
//X DD DSN=FILE.NAME.D&RUNDATE..T&RUNTIME, |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Arunkumar Chandrasekaran wrote: |
Code: |
// SET DATE=D&YYMMDD.
//IEFBR14 EXEC PGM=IEFBR14
//NEWDS DD DSN=MAGT.&DATE..CNTL,DISP=(,CATLG),
// SPACE=(TRK,(1,1,1)),BLKSIZE=0,LRECL=80 |
and MAGT.D121204.CNTL is created. |
did this work for you?
As it did not work for me, I get this error:
Code: |
STMT NO. MESSAGE
4 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD |
I'm not sure but it sounds like I should suggest you to read about EZACFSM1 instead. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
There are some envirnment where JCL like what Arunkumar has shown is sent to other parser which replaces these variables with value and then submits it.
Could be similar case... |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 582 Location: London
|
|
|
|
helps if you include the relevent messages. I tried this and get the following (as expected).You can clearly see in the substitution JCL that no date value is being passed. Still the same if set value is in quotes which it has to be when you have special characters like the & in it.
Give up and use the example I provided. System symbols can only be used in started task JCL
publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.ieab600/symparm.htm
IEFC653I SUBSTITUTION JCL - DSN=FILE.NAME.D&YYMMDD.TEST,DISP=(,CATLG),SPACE=(TRK,(1,1)),BLKSIZE=0,LRECL=80
STMT NO. MESSAGE
4 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD |
|
Back to top |
|
|
|