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: 4648
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm


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