View previous topic :: View next topic
|
Author |
Message |
ibmvijay
New User
Joined: 08 Feb 2006 Posts: 3
|
|
|
|
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 |
|
|
gskulkarni
New User
Joined: 01 Mar 2006 Posts: 70
|
|
|
|
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 |
|
|
devikanth
New User
Joined: 30 Jun 2005 Posts: 2 Location: chicago
|
|
|
|
//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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|