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
 
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: 4650
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

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