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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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