I stand by my statement that it would be easy to write Rexx to do this. I
don't pretend to be a DFSORT expert. If DFSORT has this as a native
capability too, that's terrific.

Might I respectfully suggest that your documentation could use some work, if
neither the OP nor the diligent @Lizette could find the answer to this
simple question?

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Sri h Kolusu
Sent: Saturday, April 15, 2017 2:01 PM
To: [email protected]
Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT
record count is not zero

Minoru Massaki,

It is quite simple to set a return code using COUNT operator. Here are a
couple of ways setting the RC=4 . You can also set RC8 and RC12 too.

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=* 
//DFSMSG   DD SYSOUT=* 
//IN       DD * 
A 
//TOOLIN   DD * 
  COUNT FROM(IN) NOTEMPTY RC4
//* 

or

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=* 
//DFSMSG   DD SYSOUT=* 
//IN       DD * 
//TOOLIN   DD * 
  COUNT FROM(IN) HIGHER(0) RC4
//* 


Check this link which explains in about COUNT operator and check out the
examples too.

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1
.icea100/ice2ca_COUNT_operator.htm


>>I would say, no, you cannot have DFSORT do something like this.  I am
not seeing anything the DFSORT manuals from IBM to allow the user to force
DFSORT to set codes other than it is already doing.

Lizette,

Sorry to say that you are wrong. DFSORT does have the capability. we can
handle different scenarios. EMPTY/NOTEMPTY and "n" number of records too


>>Pretty trivial to write Rexx to set a return code based on file 
empty/Not empty.

DFSORT already handles these scenarios.


Thanks,
Kolusu
DFSORT Development



From:   Minoru Massaki <[email protected]>
To:     [email protected]
Date:   04/15/2017 08:03 AM
Subject:        How can I set Non-zero return code in DFSORT when SORTOUT 
record count is not zero
Sent by:        IBM Mainframe Discussion List <[email protected]>



Hello

I'm looking for a way to set Non-zero return code in DFSORT, when record
count of SORTOUT is not zero.

I know that setting non-zero return code when SORTOUT record count is 
zero.

Your help would be highly appreciated.

-- 

全先 実  -  Minoru Massaki  (M*M)
E-mail: [email protected]

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN






----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to