IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to use OPC variable as a JCL parameter


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prasanna SR

New User


Joined: 13 Jul 2010
Posts: 6
Location: Mexico City

PostPosted: Mon Sep 13, 2010 10:11 pm
Reply with quote

Hi,

I want to use the OPC variable (from OPC tables) in the JCL as a Variable. I tried the below one but the substitution is not working correctly.

I have the variable FECHUGF0 value as 1010 in table CSOLOTABLE.

But JCL substitution is trying to catalog the file as MDMX017.BS100.PURGEMA.FFECHUGF0

//*
//*%OPC SCAN
//*%OPC SEARCH NAME=(CSOLOTABLE)
//*%OPC SETVAR FECHUGF0=(YYMM)
// SET FDATE=FECHUGF0
//*
//STEP0020 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=MDMX017.BS100.PURGEMA
//SYSUT2 DD DSN=MDMX017.BS100.PURGEMA.F&FDATE,
// DISP=(NEW,CATLG,DELETE),
// DCB=*.SYSUT1,SPACE=(CYL,(100,100),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*


Can someone help?

Thanks
Prasanna
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Sep 14, 2010 5:07 am
Reply with quote

Hi,

try changing to
Code:
// SET FDATE=%FECHUGF0



Gerry
Back to top
View user's profile Send private message
Prasanna SR

New User


Joined: 13 Jul 2010
Posts: 6
Location: Mexico City

PostPosted: Tue Sep 14, 2010 5:09 am
Reply with quote

Tried this and it worked.

//*%OPC SCAN
//*%OPC SEARCH NAME=(CSOLOTABLE)
// SET FDATE=&FECHUGF0
//*
//STEP0020 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=M&AMB.MX017.BS100.PURGEMA
//SYSUT2 DD DSN=M&AMB.MX017.BS100.PURGEMA.F&FDATE,
// DISP=(NEW,CATLG,DELETE),
// DCB=*.SYSUT1,SPACE=(CYL,(100,100),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top