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

Need to set RC4 through JCL SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajesh7523

New User


Joined: 15 Dec 2022
Posts: 8
Location: BHOPAL

PostPosted: Wed Apr 03, 2024 2:29 pm
Reply with quote

Hi All,

I want to set the return code =04 only if below sort logic satisfy, and if it didnt have duplicates or not satisfy the sort condition then RC00

SORT FIELDS=(1,24,CH,A),EQUALS
SUM FIELDS=NONE

here is my job

Code:
//STEP020B EXEC  PGM=SORT                                   
//SYSOUT   DD  SYSOUT=*                                     
//SORTIN   DD  DSN=TEST.CBS.ROJ1.IDOC0410.MASTER.WORK1,     
//             DISP=SHR                                     
//SORTOUT  DD  DSN=TEST.CBS.ROJ1.DLS.IDOC0410.MASTER.D0307,
//             DISP=(NEW,CATLG,DELETE),                     
//             UNIT=SYSDA,                                 
//             SPACE=(TRK,(4000,400),RLSE),                 
//             DCB=(MODELDCB,RECFM=FB,LRECL=3728,BLKSIZE=0)
//SYSIN    DD  *                                           
 SORT FIELDS=(1,24,CH,A),EQUALS                             
 SUM FIELDS=NONE                                           
/*                                                         


This is my requirement because, I want to execute the next steps only if it satisfies else it should skip the next steps. if we set the RC then condition check in next step we can execute or skip

Also i tried to set RC04 with IDCAMS, it is working with out sortlogic not with it.

Please help me with the sort logic.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1306
Location: Bamberg, Germany

PostPosted: Wed Apr 03, 2024 3:07 pm
Reply with quote

So RC04 if dups, RC00 if no dups? The other condition makes no sense.
Back to top
View user's profile Send private message
rajesh7523

New User


Joined: 15 Dec 2022
Posts: 8
Location: BHOPAL

PostPosted: Wed Apr 03, 2024 4:55 pm
Reply with quote

yahh i need to setup the RC based on the satisfying condition.

any one pls help me with the sort logic
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1306
Location: Bamberg, Germany

PostPosted: Wed Apr 03, 2024 5:44 pm
Reply with quote

See ICETOOL COUNT operator with EMPTY/NOTEMPTY. You can set RC4/RC8 or RC12 in this case.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2119
Location: USA

PostPosted: Wed Apr 03, 2024 6:38 pm
Reply with quote

rajesh7523 wrote:

Also i tried to set RC04 with IDCAMS, it is working with out sortlogic not with it.


IDCAMS and SORT are two separate and independent utility programs. The difference is the same as between a train, and a plane.

You cannot use a train ticket to board a plane.
In the same manner you cannot "set RC04 in IDCAMS" to "start working with sort logic" icon_exclaim.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3075
Location: NYC,USA

PostPosted: Sat Apr 06, 2024 1:05 am
Reply with quote

Add another step to the proc or job and use output data set from the mentioned step above and set rc to 04 if empty to decide what action to perform in subsequent steps.

www.ibmmainframeforum.com/jcl/topic7327-10.html
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SORT CARD meaning please DFSORT/ICETOOL 3
No new posts Add condition to a FINDREP SORT card DFSORT/ICETOOL 4
No new posts Sort based on the record type DFSORT/ICETOOL 1
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts To Omit records based n SORT condition DFSORT/ICETOOL 6
Search our Forums:

Back to Top