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

Can we have some Return code from SYNCSORT statements


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Fri Jan 25, 2008 4:19 pm
Reply with quote

I am using SYNCSORT to find out the presence of certain strings in a PS file. Can we have any type of return code from the SORT method only to know the presence of the string searched.

What I am doing now is coying the desired records in some other file and then checking weather it has any records or not using IDCAMS.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Jan 25, 2008 4:29 pm
Reply with quote

search for the NULLOFL parameter.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Sat Jan 26, 2008 10:07 am
Reply with quote

This SORT JCL returns 4 if the string "NAME" was not found in inout file at the position 1,4.

Code:
//*******************************************************
//STEP1    EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
NAME
ADDR
LKMN
/*                                                       
//SORTOUT  DD DUMMY                                     
//SYSIN    DD *   
   OPTION COPY,NULLOUT=RC4           
   INCLUDE COND=(1,4,CH,EQ,C'NAME')                                       
 /*     
Back to top
View user's profile Send private message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Thu Jan 31, 2008 1:39 pm
Reply with quote

thank u
kRISPREMs
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Jan 31, 2008 3:06 pm
Reply with quote

with a slight meaning...you can code it in the PARM, for example:

Code:

//*----------------------------------------------------
//ICEMAN   EXEC PGM=ICEMAN,PARM='NULLOUT=RC4'         
//SYSOUT    DD SYSOUT=*                               
//SORTIN    DD *                                       
AAAAAAAAAAAAAAAAAA                                     
BBBBBBBBBBBBBBBBBBB                                   
CCCCCCCCCCCCCCCCCCCCCC                                 
CCESTACCCCCCCCCCCCCCCC                                 
DDDDDDDDDDDDDDDDDDDDDDDD                               
/*                                                     
//SORTOUT   DD SYSOUT=*                               
//SYSIN     DD *                                       
  OPTION  COPY                                         
  INCLUDE COND=(1,80,SS,EQ,C'XYZ')                     
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
Search our Forums:

Back to Top