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

Input and output filenames in the SYSIN rather than DDnames


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
DKartiya

New User


Joined: 30 Jan 2008
Posts: 26
Location: Chennai

PostPosted: Tue Feb 24, 2009 9:33 am
Reply with quote

Hi all,

I was trying to copy a file using IDCAMS REPRO command.

Is it possible to give input and output filenames in the SYSIN card rather than the ddnames for copying.

==> If the above is possible with any other SORT command also, please
let me know. Thanks

Regards,
Karthi.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Feb 24, 2009 9:38 am
Reply with quote

Quote:
Is it possible to give input and output filenames in the SYSIN card rather than the ddnames for copying.

What do you mean here?
Back to top
View user's profile Send private message
DKartiya

New User


Joined: 30 Jan 2008
Posts: 26
Location: Chennai

PostPosted: Tue Feb 24, 2009 9:42 am
Reply with quote

Hi,

Ths SYSIN card that we give for REPRO is
//SYSIN DD *
REPRO -
INFILE(INDD) -
OUTFILE(OUTDD)
/*

Is it possible to give
//SYSIN DD *
REPRO -
INFILE(Input dataset name) -
OUTFILE(Output dataset name)
/*

Thanks,
Karthi
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Feb 24, 2009 9:48 am
Reply with quote

This will do it.
Code:
//SYSIN DD *
REPRO -
INDATASET(Input dataset name) -
OUTDATASET(Output dataset name)
/*


Please try it.
Back to top
View user's profile Send private message
DKartiya

New User


Joined: 30 Jan 2008
Posts: 26
Location: Chennai

PostPosted: Tue Feb 24, 2009 9:57 am
Reply with quote

Hi Gnans,

Thanks a lot !! It works for me.

Regards,
Karthi.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Tue Feb 24, 2009 10:02 am
Reply with quote

The manual entitled DFSMS/MVS V1R5 Access Method Services for VSAM Catalogs has your answer. Also, I think you'll find that your site's SORT product will perform better than IDCAMS REPRO when it comes to copying files.
Back to top
View user's profile Send private message
DKartiya

New User


Joined: 30 Jan 2008
Posts: 26
Location: Chennai

PostPosted: Tue Feb 24, 2009 10:19 am
Reply with quote

Hi Terry,

Thanks. Please let me know if we can use SORT for the same.

Is it possible to specify the input and output datasets in the SORT
SYSIN card for copying ????

Regards,
Karthi
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Tue Feb 24, 2009 10:35 am
Reply with quote

Not in SYSIN. See the JCL syntax for your site's SORT product.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Feb 24, 2009 10:35 am
Reply with quote

Hello,

Typically, when a file is copied using the sort, the SORTIN and SORTOUT dd statements contain the input and output dataset names. If the dcb info is not specified, the input dcb info is copied onto the output file.

The only sysin data needed is
Code:
//SYSIN    DD  *       
   SORT FIELDS=COPY     
/*


This will make a mirror image of the input file. Using additonal control info, you can reformat data, copy vsam to qsam, etc
Back to top
View user's profile Send private message
DKartiya

New User


Joined: 30 Jan 2008
Posts: 26
Location: Chennai

PostPosted: Tue Feb 24, 2009 10:43 am
Reply with quote

Thanks Dick and Terry.

I am aware of OPTION copy in SORT.

My filenames are dynamic. I cannot directly give it in the SORTIN
and SORTOUT. I have to mention them in the SYSIN only.

That the reason i checked with IDCAMS.

Thanks a lot of all ur input!!

Regards,
Karthi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Feb 24, 2009 11:06 am
Reply with quote

Hello,

Quote:
My filenames are dynamic. I cannot directly give it in the SORTIN
and SORTOUT. I have to mention them in the SYSIN only.
What can you provide in the sysin that you cannot provide as a dataset name?
Back to top
View user's profile Send private message
DKartiya

New User


Joined: 30 Jan 2008
Posts: 26
Location: Chennai

PostPosted: Tue Feb 24, 2009 1:05 pm
Reply with quote

Hi Dick,

My output filename of copy is dynamic
The output filename looks like APCD.APCD###.APCD ,Where ### -is a sequence number

I have a pgm where this sequence number for the file is arrived upon. In this program itself, I will create a temp file with contents as
REPRO INDATASET(‘My original file name’)
OUTDATASET(‘APCD.APCD###.APCD)

I will then use the temp file as SYSIN to the next IDCAMS step.
Step1- Program where the temp file with seq # replaced is created
Step2 – IDCAMS for copying.


Regards,
Karthi
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Feb 24, 2009 1:08 pm
Reply with quote

Why do people insist on using manually generated sequence numbers instead of a GDG. Why reinvent the wheel when the wheel works perfectly well in the first place.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Feb 24, 2009 9:02 pm
Reply with quote

Hello,

If you can generate the sysin, you can generate the entire step including the dd/dsns. Once generated, these would be submitted via the internal reader.

If you are copying a few records, which utility you use will not much matter. If you are copying hundreds of millions of records, you want to use sort rather than idcams regardless if it takes a bit more implementation work.

Also, as Expat mentions, is there some business reason to implement your own mechanics for "generations". GDGs have worked well for a long, long time. . .
Back to top
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Tue Feb 24, 2009 9:27 pm
Reply with quote

Devil's Advocate mode='On'

I've seen a number of cases where a 'sequence number' within a DSN does not equate to GDG generation;

Customer statement processing where >150 million records need splitting out to allow parallel processing of the data within the overnight batch window; this went out to either 17 'sectional' files or 58 'sub-sectionalised' files. Allocation to file was based on branch sort code.

Extraction of test data - a production file was copied to test files, some of which were then aged to allow for 14 different test run dates, some of which had specific test cases created within the data. We used a very convoluted 2LQ which allowed us to group datasets to be loaded for each test date set-up process.

Not forgetting what the Adam Smith institue defines as "the Lego scenario"; sometimes a system is so convoluted that you can not practically take it apart to make changes, all you can do is add on more bricks around the edges. If the files are referenced and used extensively as flat files it may be impractical to convert them to GDGs, however desirable that might be.

Cheers.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Feb 25, 2009 12:27 am
Reply with quote

Yup, which is why i mentioned the internal reader alternative.

This preserves the current naming/numbering scheme yet still allows using a better utility for large volumes icon_smile.gif

d
Back to top
View user's profile Send private message
DKartiya

New User


Joined: 30 Jan 2008
Posts: 26
Location: Chennai

PostPosted: Wed Feb 25, 2009 9:23 am
Reply with quote

Dick,

That right. We need to have flat files only. The reason being parallel processing.

I can submit thru internal reader. But that means i need to have a code in place to save the JCL submitted to internal reader for restart reasons
which will again be an overload.

Already i have couple of such JCLs submitted through internal reader in the same job. That the reason i didnt go for the option of changing the dsn names in JCLs.

Regards,
Karthi.
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 COBOL sorting, with input GDG base COBOL Programming 7
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
Search our Forums:

Back to Top