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 All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts USAGE parameter of RACDCERT CONNECT c... All Other Mainframe Topics 2
No new posts variable in library name within a PROC. JCL & VSAM 11
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts CA7 count with DATE variable CA Products 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:


Back to Top