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
 
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

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