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
 

 

Input and output filenames in the SYSIN rather than DDnames

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Input and output filenames in the SYSIN rather than DDnames
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: 785
Location: Chennai, India

PostPosted: Tue Feb 24, 2009 9:38 am    Post subject:
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    Post subject: Reply to: Reg file copy
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: 785
Location: Chennai, India

PostPosted: Tue Feb 24, 2009 9:48 am    Post subject:
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    Post subject: Reply to: Reg file copy
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: 1238
Location: Richfield, MN, USA

PostPosted: Tue Feb 24, 2009 10:02 am    Post subject:
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    Post subject: Reply to: Reg file copy
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: 1238
Location: Richfield, MN, USA

PostPosted: Tue Feb 24, 2009 10:35 am    Post subject:
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

Site Director


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

PostPosted: Tue Feb 24, 2009 10:35 am    Post subject:
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    Post subject: Reply to: Reg file copy
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

Site Director


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

PostPosted: Tue Feb 24, 2009 11:06 am    Post subject:
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    Post subject: Reply to: Reg file copy
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: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 24, 2009 1:08 pm    Post subject:
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

Site Director


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

PostPosted: Tue Feb 24, 2009 9:02 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Feb 25, 2009 12:27 am    Post subject: Reply to: Input and output filenames in the SYSIN rather tha
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    Post subject: Reply to: Input and output filenames in the SYSIN rather tha
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    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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm


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