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
 

 

One PS file should be copied to a output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
SathyaS

New User


Joined: 20 Sep 2005
Posts: 11

PostPosted: Thu Jun 01, 2006 6:56 pm    Post subject: One PS file should be copied to a output file
Reply with quote

I have two input files. One file should be copied to a output file while the other file needs to be copied to multiple output files. Is there any way to achieve this in a single step by using utilities like IEBGENR/IEBCOPY?
Thanks in advance.
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 Jun 01, 2006 7:42 pm    Post subject: Re: Copying PS.
Reply with quote

An IDCAMS REPRO job would work well, as would ICETOOL (DFSORT) or SYNCTOOL (SYNCSORT).
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Thu Jun 01, 2006 7:57 pm    Post subject:
Reply with quote

//SPLITBY EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE,DISP=OLD
//01 DD DSN=FILE01,DISP=MOD
//02 DD DSN=FILE02,DISP=MOD
//03 DD DSN=FILE03,DISP=MOD
//04 DD DSN=FILE04,DISP=MOD
//05 DD DSN=FILE05,DISP=MOD
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(01,02,03,04,05)
/*


Regards
jai
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jun 01, 2006 9:05 pm    Post subject:
Reply with quote

SathyaS,

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1
//IN2 DD DSN=...  input file2
//OUT1 DD DSN=...  output file for IN1
//MULT1 DD DSN=...  output file1 for IN2
//MULT2 DD DSN=...  output file2 for IN2
...
//MULTn DD DSN=...  output filen for IN2
//TOOLIN DD *
* Copy IN1 to OUT1
COPY FROM(IN1) TO(OUT1)
* Copy IN2 to MULT1-MULTn
COPY FROM(IN1) TO(MULT1,MULT2,...,MULTn)
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jun 01, 2006 9:12 pm    Post subject:
Reply with quote

Jai,

Your job doesn't do what was asked for and will get a JCL error for the 01-05 ddnames (a ddname cannot start with a number). I suspect you meant to use SORTOF01-SORTOF05 for the ddnames, but that still doesn't do what was requested.

Please try to read peoples' posts more carefully to understand what they want. Please test your jobs before posting them to avoid confusing people.
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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