Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using Symbolic parameters in SET statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 61
Location: India

PostPosted: Tue Dec 04, 2012 10:27 pm    Post subject: Using Symbolic parameters in SET statement
Reply with quote

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
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Dec 04, 2012 10:42 pm    Post subject:
Reply with quote

You appear to be confusing JCL symbolics with ISPF system variables.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Tue Dec 04, 2012 10:46 pm    Post subject: Reply to: Using Symbolic parameters in SET statement
Reply with quote

You have to show what error you got. Did you mean &WDAY?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Dec 05, 2012 1:53 am    Post subject:
Reply with quote

Why do you have a period at the end of the SETs
"// SET DATE=D&YYMMDD."and "// SET DAY=D&ZDAY." ?
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Wed Dec 05, 2012 7:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Dec 05, 2012 7:22 pm    Post subject: Re: Using Symbolic parameters in SET statement
Reply with quote

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. icon_rolleyes.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Dec 05, 2012 7:34 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Wed Dec 05, 2012 9:01 pm    Post subject:
Reply with quote

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
http://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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us