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

Question on SYNCSORT


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

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed Jul 16, 2008 3:29 pm
Reply with quote

Can some body tell me there are two sort steps in my jcl

ex : sysut1
sysut2

we are sorting the data of sysut1 and writing into sysut2 and in the next step we are taking the output of first step and again sorting and writing into another file. my question is can we do in a single step.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 16, 2008 3:31 pm
Reply with quote

Not sure that SYSUT1 & 2 are common sort files.

Please post your JCL
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 3:49 pm
Reply with quote

Veena,

If you can SORT the data from the input files in the first step and the second step, you should be able to use those SORT statements combined in a single step.

As requested, Post your JCL.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Jul 16, 2008 3:58 pm
Reply with quote

I guess we should be able to do in one step

By the way whats your sort criteria
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed Jul 16, 2008 5:41 pm
Reply with quote

Code:
                                                     
//STEP060  EXEC PGM=SYNCSORT                                   
//SYSIN    DD  DSN=AMX.PROD.DATALIB(EFBR2735),             
//             DISP=SHR                                   
//SORTIN   DD  DSN=SSR.XXBRX.EFBRD273.SETRANS.UNSORT,     
//             DISP=SHR                                   
//SORTOUT  DD  DSN=XXXXXX.XXBRX.EFBRD273.SETRANS.BZROC,   
//             DISP=(,CATLG,DELETE),                                 
//             DATACLAS=STANDARD,                         
//             UNIT=SYSDA                                                             
//SYSOUT   DD  SYSOUT=*                                           
//SYSPRINT DD  SYSOUT=*                                           
//*                                                               
//STEP010  EXEC PGM=SYNCSORT                                                   
//SYSOUT   DD  SYSOUT=*             
//SORTIN   DD  DISP=SHR,DSN=XXXXXX.XXBRX.EFBRD273.SETRANS.BZROC 
//*                                                               
//SORTOUT  DD  DSN=&&TEMP,                                       
//             DISP=(,PASS),                           
//             UNIT=SYSDA, 
//             DATACLAS=STANDARD                                 
//SYSIN    DD  DSN=AMX.PROD.DATALIB(EFW19991),
//             DISP=SHR
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 16, 2008 5:49 pm
Reply with quote

Great - My sort criteria are

AMX.PROD.DATALIB(EFBR2735)
AMX.PROD.DATALIB(EFW19991)

Methinks the requestor wants to see what is INSIDE these pds members.
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed Jul 16, 2008 5:51 pm
Reply with quote

AMX.PROD.DATALIB(EFBR2735)

SORT FIELDS=(7,3,CH,A,10,10,CH,A,20,20,CH,A,5,2,CH,A)

AMX.PROD.DATALIB(EFW19991)

SORT FIELDS=(007,03,CH,A, *SETTLEMENT CURRENCY
010,25,CH,A, *PARTIAL SOC KEY
035,05,PD,A, *IP DATE
005,02,CH,A, *RECORD CODE
079,08,PD,A) *ROC REF NO
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Wed Jul 16, 2008 5:52 pm
Reply with quote

If you want quick reply, post all the details. Without looking into SORT cards, cannot tell whether this can be done in a single step or not.
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed Jul 16, 2008 6:36 pm
Reply with quote

posted all the details which ever requested. can you tell me how come my question will depend upon the sort cards. Also give me sample code if its possible
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 16, 2008 9:59 pm
Reply with quote

Hello,

Quote:
can you tell me how come my question will depend upon the sort cards
Because some things can work together and some things cannot.

You cannot have 2 "sort fields=" in the same sysin of a Syncsort execution. You will get a "duplicate" error - which you can verify by simply trying it on your system.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Jul 17, 2008 12:52 am
Reply with quote

Each sort is a different sequence. These cannot be combined.

Is the sorted BZROC file from step 1 used somewhere else?

The current job just happens to need the records in a special sequence (step 2).
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 only first records of the fil... SYNCSORT 7
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
Search our Forums:

Back to Top