Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Question on SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed Jul 16, 2008 3:29 pm    Post subject: Question on SYNCSORT
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
References
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3542
Location: Brussels once more ...

PostPosted: Wed Jul 16, 2008 3:31 pm    Post subject:
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: 1148
Location: Mumbai - India

PostPosted: Wed Jul 16, 2008 3:49 pm    Post subject: Reply to: Question on sort
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: 288

PostPosted: Wed Jul 16, 2008 3:58 pm    Post subject: Reply to: Question on sort
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    Post subject:
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: 3542
Location: Brussels once more ...

PostPosted: Wed Jul 16, 2008 5:49 pm    Post subject:
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    Post subject:
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

Senior Member


Joined: 08 Jun 2006
Posts: 307
Location: Pune, India

PostPosted: Wed Jul 16, 2008 5:52 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 23 Nov 2006
Posts: 8723
Location: 221 B Baker St

PostPosted: Wed Jul 16, 2008 9:59 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 17, 2008 12:52 am    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1