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
 

 

Need to create file with Dynamic Name in BMP triggered JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kapil27

New User


Joined: 05 Aug 2014
Posts: 1
Location: INDIA

PostPosted: Wed May 25, 2016 9:45 am    Post subject: Need to create file with Dynamic Name in BMP triggered JCL
Reply with quote

Hi I want to use Dynamic Name while creating the dataset in BMP triggered JCL.

For Instance, I want to create dataset as

userid.report

I have userid stored in a file, but how to use while creating dataset.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1742
Location: NY,USA

PostPosted: Wed May 25, 2016 8:54 pm    Post subject:
Reply with quote

Unless there is any better way, you will have to write a program to create dynamic file name and formulate your JCL in the same program and use INTRDR to trigger that JOB. Or check with Scheduling team if they have something they can help with.
Back to top
View user's profile Send private message
rajesh1183

New User


Joined: 07 Jan 2008
Posts: 98
Location: Hyderabad

PostPosted: Thu May 26, 2016 3:12 pm    Post subject:
Reply with quote

Can you try the below:

Code:

// SET ID=ABCD
//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
 SET ID=EFGH
/*
//*
//STEP2    EXEC PGM=IEFBR14
//SYSPRINT DD   SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//FILENAME DD DSN=&ID..FILE.NAME,
//         DISP=(NEW,CATLG,DELETE),
//         LRECL=80,RECFM=FB,
//         SPACE=(TRKS,(10,10),RLSE)
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1742
Location: NY,USA

PostPosted: Thu May 26, 2016 7:00 pm    Post subject:
Reply with quote

Rajesh, TS has a file in the input with many userids.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1847
Location: UK

PostPosted: Fri May 27, 2016 2:19 am    Post subject:
Reply with quote

Also, the &ID is resolved at job submission time not as each step is executed.

You could, perhaps, try dynamic allocation using BPXWDYN. Search forum, documentation, Google for examples.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 4 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am


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