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

How to copy a PS file to another PS file?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MALLIKARJUN.KUMMITHA
Warnings : 1

New User


Joined: 25 Oct 2007
Posts: 7
Location: india

PostPosted: Thu Nov 22, 2007 10:25 am
Reply with quote

Copy using sort utility:
1) // job.---------
//step 1 exec pgm=sort
//sortin dd dsn=a.b.file1, disp=shir
//sortout dd dsn=a.b.file2, disp=shir
//sortwk1 dd unit=disk
//sortwk2 dd unit=disk
//sysout dd sysout=*
//sysprint dd sysout=*
//Sysin dd*
sort fields=copy
/*
or

2 way


//job cards----

/step 1 exec pgm=iebgener
//sortin dd dsn=a.b.file1, disp=shir
//sortout dd dsn=a.b.file2, disp=shir
//sortwk1 dd unit=disk
//sortwk2 dd unit=disk
//sysout dd sysout=*
//sysprint dd sysout=*
//Sysin dd*
/*
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 Nov 22, 2007 10:43 pm
Reply with quote

MALLIKARJUN,

Your JCL is a mess (lots of unnecessary or incorrect dd statements and syntax errors). It should be:

Code:

//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=a.b.file1,DISP=SHR
//SORTOUT DD DSN=a.b.file2,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
   SORT FIELDS=COPY
/*


and

Code:

//STEP2 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=a.b.file1,DISP=SHR
//SYSUT2 DD DSN=a.b.file2,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
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 3
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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top