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
 

 

iebgener and input data set name

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

New User


Joined: 23 Jan 2010
Posts: 7
Location: Toronto

PostPosted: Thu Mar 04, 2010 8:51 pm    Post subject: iebgener and input data set name
Reply with quote

Hi,
Is it possible for iebgener to receive the input data set name dynamically, then read it and copy it to the output file?
I don't have the data set name explicitly on the jcl. I have the name of the file I want to read in another data set.
Thanks.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Thu Mar 04, 2010 9:03 pm    Post subject: Reply to: iebgener and input data set name
Reply with quote

No. JCL does not support the concept of a dynamic file name. You'll have to do this process from inside a program, or generate the JCL with the proper dataset name dynamically.

Update:

Just a thought, but have you considered POSSIBLY using IDCAMS to do this? You can REPRO to/from a dataset name to/from a DD name.
Back to top
View user's profile Send private message
somunote

New User


Joined: 23 Jan 2010
Posts: 7
Location: Toronto

PostPosted: Thu Mar 04, 2010 9:07 pm    Post subject:
Reply with quote

Do you mean with a repro?
Wouldn't I have to explicitly declare the input file name on the jcl anyway?
Thanks.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Thu Mar 04, 2010 9:21 pm    Post subject:
Reply with quote

Did you consider using symbolic parameters, if iebgener resides in some PROC? By the way, "dynamically", in the context of your question leave many other questions...some more explanation about it might help us.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 04, 2010 9:28 pm    Post subject:
Reply with quote

Maybe this will give you a clue or two
Code:
//IEBGENER EXEC PGM=IEBGENER 
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2   DD DSN=&&TEMP,DISP=(,PASS),                           
//            SPACE=(TRK,(2,2),RLSE),                           
//            RECFM=FB,LRECL=80                                 
//SYSUT1   DD *                                                 
dataset_name                  -
/*                                                               
//*                                                             
//IDCAMS01 EXEC PGM=IDCAMS                                       
//SYSPRINT DD SYSOUT=*                                           
//SYSIN    DD *                                                 
 PARM MARGINS(1 80)                                             
 LISTC ENT(                                                     -
//         DD DSN=&&TEMP,DISP=(OLD,DELETE)                       
//         DD *
 )                                                               
/*
Back to top
View user's profile Send private message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Fri Mar 05, 2010 4:11 am    Post subject:
Reply with quote

Hi,
I used repro INDATASET and it worked great.
with this command the file can be read without being declared in the jcl.
all one has to do is to created a card that will be used as idcams sysin.
Code:

//idcams exec pgm=idcams
//fileout dd dsn=...
//sysin dd *
 repro indataset('hello') outfile(fileout)

thanks.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 05, 2010 12:31 pm    Post subject:
Reply with quote

In fact, here is a complete solution as I have already used this myself.
The dataset with the dataset name is read by the SORT step and the IDCAMS card is generated and then IDCAMS does the copy
Code:
//BUILDER  EXEC  PGM=SORT                         
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD DSN=dataset with the name in it ,DISP=SHR
//SORTOUT  DD DSN=&&TEMP001,DISP=(,PASS,DELETE),   
//            RECFM=FB,LRECL=80,                   
//            SPACE=(CYL,(25,25),RLSE)             
//SYSIN    DD *                                   
 OPTION COPY                                     
 OUTFIL  BUILD=(C' IDS(',1,44,1X,C') -',80:X)   
/*                                                 
//*                                               
//IDCAMS   EXEC PGM=IDCAMS                         
//SYSPRINT DD SYSOUT=*                             
//OFILE    DD SYSOUT=*                             
//SYSIN    DD *                                   
 PARM MARGINS(1 80)
 REPRO -                                           
//         DD DSN=&&TEMP001,DISP=SHR               
//         DD *                                   
 OFILE(OFILE)                                     
/*
//
Back to top
View user's profile Send private message
somunote

New User


Joined: 23 Jan 2010
Posts: 7
Location: Toronto

PostPosted: Fri Mar 05, 2010 10:03 pm    Post subject:
Reply with quote

expat,
I hadn't understood your first reply but that's exactly what I did.
good to know I did it right.
thanks.
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 Passing data from REXX to C programme... chong.zhou All Other Mainframe Topics 0 Wed Jul 26, 2017 4:55 pm
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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