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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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