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

iebgener and input data set name


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Thu Mar 04, 2010 9:03 pm
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
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

Superior Member


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

PostPosted: Thu Mar 04, 2010 9:21 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu Mar 04, 2010 9:28 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 05, 2010 12:31 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top