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
 

 

How to use OPC variable as a JCL parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: How to use OPC variable as a JCL parameter
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: 1703
Location: Australia

PostPosted: Tue Sep 14, 2010 5:07 am    Post subject:
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    Post subject: Reply to: How to use OPC variable as a JCL parameter
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm


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