MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JCL SET statement in ISPF Skeleton

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
m1deh00mvs
Beginner


Joined: 04 Dec 2006
Posts: 3
Topics: 3

PostPosted: Sat Aug 09, 2008 8:26 am    Post subject: JCL SET statement in ISPF Skeleton Reply with quote

Hello,
I am converting existing JCL to be included by an ISPF skeleton.
The JCL uses JCL SET statements but the values are not
substituted correctly.

Following is a CLIST that sets variables
UPD and REG and FTINCLs a ISPF skeleton called TESTSET.

In TESTSET skeleton 1 (Example 1) , the values of DTE1, HLQ2, LVL2 are SET and used later in the skeleton.

In the Resulting JCL 1, the SET statements are correctly resolved
with UPD and REG but the &HLQ2, &LVL2, and &DTE1 in the dataset
name are NOT resolved.

In TESTSET skeleton 2, I doubled the ampersands (&&) in the
dataset name.

In the Resulting JCL 2, variables show their variable names like &HLQ2, &LVL2,
and &DTE1,

How can I take the resolved results of SET statements and use them later
in the skeleton?
I appreciate your assistance..
Thanks.
---------------------------------------------------------
CLIST (partial) - Variables UPD and REG are SET
SET UPD=R090727
SET REG=3
ISPEXEC FTOPEN TEMP
ISPEXEC FTINCL TESTSET
ISPEXEC FTCLOSE
ISPEXEC VGET (ZTEMPF)
ISPEXEC EDIT DATASET('&ZTEMPF'
----------------------------------------------------------
SKELETON TESTSET (Example 1)
// SET DTE1=&UPD
// SET HLQ2=&ZUSER..R&REG
// SET LVL2=VAL
//IEFBIT EXEC PGM=IEFBR14
//INDD01 DD DSN=&HLQ2..&LVL2.BKUP.GOODATA.DATA.R&DTE1,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*
------------------------------------------------------------
Resulting JCL 1 - Dataset Name Variables are NOT resolved
// SET DTE1=R090727
// SET HLQ2=XYZ.R3
// SET LVL2=VAL
//IEFBIT EXEC PGM=IEFBR14
//INDD01 DD DSN=.BKUP.GOODATA.DATA.R,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*
-------------------------------------------------------------
SKELETON TESTSET (Example same as example 1 but used 2 &s in
the dataset name
// SET DTE1=&UPD
// SET HLQ2=&ZUSER..R&REG
// SET LVL2=VAL
//IEFBIT EXEC PGM=IEFBR14
//INDD01 DD DSN=&&HLQ2..&&LVL2.BKUP.GOODATA.DATA.R&&DTE1,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*
------------------------------------------------------------
Resulting JCL 2 - Dataset Name Variables are NOT resolved
// SET DTE1=R090727
// SET HLQ2=XYZ.R3
// SET LVL2=VAL
//IEFBIT EXEC PGM=IEFBR14
//INDD01 DD DSN=&HLQ2..&LVL2.BKUP.GOODATA.DATA.R&DTE1,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*
-------------------------------------------------------------
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Aug 09, 2008 10:17 am    Post subject: Reply with quote

I'm not sure what the question is here. The results look fine. Substitution of the dd statement is done by the JCL interpreter when you submit the job. From the job output:
Code:
IEFC653I SUBSTITUTION JCL - DSN=USERXX.R3.VALBKUP.GOODATA.DATA.RR090727 ...


Not sure why you need SET here at all rather than just letting the FTINCL do all the substitution, but if you need to, you can use SET symbols in other SET statements. The skel
Code:
// SET DTE1=&UPD
// SET HLQ2=&ZUSER..R&REG
// SET LVL2=VAL
// SET FINAL=&&HLQ2..&&LVL2.BKUP.GOODATA.DATA.R&&DTE1
//IEFBIT EXEC PGM=IEFBR14
//INDD01 DD DSN=&&FINAL.,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*

creates
Code:
// SET DTE1=R090727
// SET HLQ2=USERXX.R3
// SET LVL2=VAL
// SET FINAL=&HLQ2..&LVL2.BKUP.GOODATA.DATA.R&DTE1
//IEFBIT EXEC PGM=IEFBR14
//INDD01 DD DSN=&FINAL.,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*

which resolves to
Code:
2 // SET DTE1=R090727
3 // SET HLQ2=USERXX.R3
4 // SET LVL2=VAL
5 // SET FINAL=&HLQ2..&LVL2.BKUP.GOODATA.DATA.R&DTE1
  IEFC653I SUBSTITUTION JCL - FINAL=USERXX.R3.VALBKUP.GOODATA.DATA.RR090727
6 //IEFBIT EXEC PGM=IEFBR14
7 //INDD01 DD DSN=&FINAL.,
  // DISP=(MOD,DELETE,DELETE),
  // SPACE=(TRK,0)
  //*
  IEFC653I SUBSTITUTION JCL - DSN=USERXX.R3.VALBKUP.GOODATA.DATA.RR090727,DISP=(MOD,DELETE,DELETE),SPACE=(TRK,0)

_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
m1deh00mvs
Beginner


Joined: 04 Dec 2006
Posts: 3
Topics: 3

PostPosted: Sat Aug 09, 2008 6:30 pm    Post subject: Reply with quote

Thank you very much for your expert answer.
As you stated, I did not have an issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group