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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: I want the sort JCL which will copy the records from PS to K
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    Post subject:
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    Post subject: Code
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu May 25, 2006 9:06 pm    Post subject:
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    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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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