Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 63
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: 1777
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: 7315

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: 445
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: 445
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
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us