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

input the dataset name to the JCL during run time


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

New User


Joined: 04 Aug 2008
Posts: 5
Location: Chennai

PostPosted: Tue Jun 05, 2012 3:20 pm
Reply with quote

How to get the dataset name as input to the JCL during RUNTIME? the dataset name should not be hardcoded in JOB but should be taken as input during execution.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Jun 05, 2012 3:49 pm
Reply with quote

Subha Sreenivasan wrote:
How to get the dataset name as input to the JCL during RUNTIME? the dataset name should not be hardcoded in JOB but should be taken as input during execution.

Any number of ways:
  1. Specify it as a parameter or in a control member and have the program allocate it dynamically.
  2. Have the JCL fabricated (from a skeleton or otherwise) and submitted with the TSO SUBMIT command or written to the internal reader.
  3. Use your scheduling product to modify a virtual copy of the JCL when the job is submitted.
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Tue Jun 05, 2012 3:53 pm
Reply with quote

Hi Subha,

Do you mean dynamic allocation?
If so, you can pass through PARM....

Here is one example

Code:

XXS05A     EXEC PGM=SASLPA,REGION=6M,                         
XX             PARM=('SYSPARM="&VAR1,&DATE8,&VAR2,&DSN3.055"')

IEFC653I SUBSTITUTION JCL - PGM=SASLPA,REGION=6M,PARM=('SYSPARM="1205,20120531,TST.UACC.JW24053.A.D,JW29055"')




Datasets -
TST.UACC.JW24053.A.D1205
TST.UACC.JW29055.A.D1205


Thanks
-3nadh
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Jun 05, 2012 5:20 pm
Reply with quote

Hi bodatrinadh,
I think PGM=SASLPA is site specific utility and not a standard at all shops.

CODE=806
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Jun 05, 2012 11:31 pm
Reply with quote

Depends what you mean by allocate a dataset at runtime. Your CJL is finished with before the job runs. Passing a datasetname as a parameter to a program is not allocating via JCL - the program does a dynamic allocate of the dataset when it starts.

Really, it is unclear as to what TS is wanting - a clearer definition of the problem would be helpful.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 06, 2012 9:39 am
Reply with quote

I agree with Nic, the original question is indeed confusing - my first thought was if it is asking about "prompt" to key-in the data-set? Perhaps, ill effect of using too much PC... icon_smile.gif
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Wed Jun 06, 2012 10:03 am
Reply with quote

Quote:

I think PGM=SASLPA is site specific utility and not a standard at all shops.


Yes Vasanth, PGM=SASLPA is a site specified utility.

Thanks
-3nadh
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts To get the the current time DFSORT/ICETOOL 13
Search our Forums:

Back to Top