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

Symbolic OverRide within a 'Include' CopyMember ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sysaron

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Thu Aug 27, 2015 10:51 pm
Reply with quote

Good morning all,

Every year we need to change 80+ PROCs to include the current year in the mainframe DSN.
2013 = SYSIC.EXPL13.DATA
2014 = SYSIC.EXPL14.DATA
2015 = SYSIC.EXPL15.DATA
I want to create a PROC copy member that has a symbolic that will be moved to the DSN later in the PROC. The objective is to only chg this one PROC each year, and it will be copied into the 80+ PROCs.
They wont accept a GDG file. Thanks for your help.

Original:
//TCSPROC1 PROC YEAR=15
used for
SYSIC.EXPL&YEAR..DATA

New (doesn’t work):
//TCSPROC1 PROC
// INCLUDE MEMBER=TCSDATE

II YEAR=15
CAY6006S VERB 'YEAR=15' IS UNKNOWN


MEMBER TCSDATE contents are:
// YEAR=15
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 27, 2015 11:07 pm
Reply with quote

In your original, YEAR=15 is a symbol which gets passed to the PROC.

In your new example, your JCL-checker is telling you that YEAR=15 is not a VERB, by which I guess it means "is not JCL". Which it isn't. You need to find ways, which are valid JCL, to set a value to a symbol.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 27, 2015 11:38 pm
Reply with quote

Look at SET in the JCL Reference manual.
Back to top
View user's profile Send private message
Sysaron

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Fri Aug 28, 2015 2:27 am
Reply with quote

Can anyone think of a way to use the DFSORT DD CARD //SYMNAMES
as
CURYR2,S'&LYR2'
to accomplish what I am trying to do with an external DSN?
Back to top
View user's profile Send private message
Sysaron

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Fri Aug 28, 2015 4:51 am
Reply with quote

IT WORKED - YAHOOOO!! We only have to Change one member for all the PROCS Every Year!

THANK YOU Robert Simple for pointing me to the "Set" Command

XXP9UP9999 PROC
XX INCLUDE MEMBER=TCUDDATE
XXSETYR SET YR=15
DSN=SYSIC.EXPL&YR..DATA,
IEFC653I SUBSTITUTION JCL - DSN=SYSIC.EXPL15.DATA,
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 28, 2015 8:47 am
Reply with quote

Good to hear you got it working -- even if you did get my name wrong!
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Tue Sep 08, 2015 2:32 am
Reply with quote

Another approach is to use IDCAMS utility to define a NONVSAM ALIAS, so in the JCL you never have to change the dataset name, you just change the ALIAS to point to another underlying file each year. (Both file names must be in the same catalog)

e.g.
In your JCL you always specify the name as SYSIC.EXPL.DATA and it doesn't change, it is not even a physical dataset, just a pointer in the catalog to the real underlying physical dataset...

so for year 2013:
DEFINE ALIAS(NAME(SYSIC.EXPL.DATA) -
RELATE(SYSIC.EXPL13.DATA) )

year 2014..repoint the alias to the 2014 year dataset..
DEFINE ALIAS(NAME(SYSIC.EXPL.DATA) -
RELATE(SYSIC.EXPL14.DATA) )
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Sep 19, 2015 12:24 am
Reply with quote

if you are on z/OS 2.1 then you can use a system symbol and do away with that include.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
No new posts passing symbolic parameters through d... JCL & VSAM 3
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
Search our Forums:

Back to Top