Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us