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

One PS file should be copied to a output file


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

Global Moderator


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

PostPosted: Thu Jun 01, 2006 7:42 pm
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
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 Developer


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

PostPosted: Thu Jun 01, 2006 9:05 pm
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 Developer


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

PostPosted: Thu Jun 01, 2006 9:12 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top