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

I want the sort JCL which will copy the records from PS to K


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ibmvijay

New User


Joined: 08 Feb 2006
Posts: 3

PostPosted: Thu May 25, 2006 10:01 am
Reply with quote

Hi friends,





Help me??????

I want the sort JCL which will copy the records from PS to KSDS. If anyone know, please forward the JCL as soon as possible.
Back to top
View user's profile Send private message
gskulkarni

New User


Joined: 01 Mar 2006
Posts: 70

PostPosted: Thu May 25, 2006 10:06 am
Reply with quote

Code:
//STEP010  EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SORTMSG  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN   DD DSN='dataset',
//         DISP=(OLD,KEEP)
//*
//SORTOUT  DD DSN='new_seq_sortout_dataset',
//         DISP=(NEW,CATLG,DELETE),
//         SPACE=(CYL,(100,100),RLSE),
//         UNIT=SYSDA,
//         DCB=SYS1.DSCB
//*
//SYSIN    DD *
SORT order for your KSDS
/*
//STEP020  EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SORTMSG  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN   DD DSN='New_sorted_from_previous_step',
//         DISP=(OLD,KEEP)
//*
//SORTOUT  DD DSN='old_KSDS',
//               DISP=OLD,
//*
//SYSIN    DD *
SORT order for your KSDS
/*
Back to top
View user's profile Send private message
devikanth

New User


Joined: 30 Jun 2005
Posts: 2
Location: chicago

PostPosted: Thu May 25, 2006 12:32 pm
Reply with quote

//IDCAMS1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//OUTFL DD DSN=Q1.Q2.Q3.PDK,DISP=OLD
//INFLE DD DSN=&&INPUT,DISP=(OLD,DELETE)
//SYSIN DD *
DELETE Q1.Q2.Q3.PDK
SET MAXCC=0
DEFINE CLUSTER (NAME(Q1.Q2.Q3.PDK) -
VOLUMES(&UNITVOL) -
CYLINDERS (5 5) -
KEYS(1 0) FREESPACE(0 0) -
RECORDSIZE(74 74) -
SHAREOPTIONS(3 3) -
REUSE) -
DATA (NAME(Q1.Q2.Q3.PDK) -
CISZ(4096)) -
INDEX (NAME(Q1.Q2.Q3.PDK) -
CISZ(4096))
REPRO INFILE (INFLE) OUTDATASET (Q1.Q2.Q3.PDK)
//*

Here fields KEYS,RECORDSIZE,CISZ depends upon your data.

Thanks
Devikanth
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 May 25, 2006 9:06 pm
Reply with quote

If the ps data set already has the keys in the correct order for the KSDS, you can use a DFSORT job like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   ps file
//SORTOUT DD DSN=...  VSAM KSDS
//SYSIN DD *
  OPTION COPY
/*


If the ps data set does not have the keys in the correct order for the KSDS, you can use a DFSORT job like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   ps file
//SORTOUT DD DSN=...  VSAM KSDS
//SYSIN DD *
  SORT FIELDS=(p,m,BI,A)
/*


where p is the starting position of the key and m is the length of the key.
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 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top