How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
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: mmass...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
What problem are you trying to solve by doing this? Lizette > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Minoru Massaki > Sent: Saturday, April 15, 2017 8:03 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: How can I set Non-zero return code in DFSORT when SORTOUT record > count is not zero > > 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: mmass...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
Is this a stand alone sort, or a program invoked sort? Lizette > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Lizette Koehler > Sent: Saturday, April 15, 2017 8:09 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT record > count is not zero > > What problem are you trying to solve by doing this? > > Lizette > > > > -Original Message- > > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > > On Behalf Of Minoru Massaki > > Sent: Saturday, April 15, 2017 8:03 AM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: How can I set Non-zero return code in DFSORT when SORTOUT > > record count is not zero > > > > 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: mmass...@gmail.com > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
There are two large tape volume list files, master and transaction files, and key is volume serial(VOLSER). No duplicate VOLSER is in the files (master as well as transaction). I have to check whether all volumes in the master is processed or not by the transaction file. If there is no transaction volumes in the master files, I have to generate control statements to process the volume. In this situation, I want to set zero-return code to indicate additional process is required. If all volumes in the master file are processed, I want to set zero return code. I already have made a DFSORT JOINKEY job to do this process. Only things I want to do is return code setting such as RC=0 (No SORTOUT Record): No need additional process RC=8,12,16 (Non-zero SORTOUT records): Need additional process Above is what I like to do in DFSORT. Regards, Minoru Massaki - (M*M) 2017-04-16 0:08 GMT+09:00 Lizette Koehler : > What problem are you trying to solve by doing this? > > Lizette > > > > -Original Message- > > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > > Behalf Of Minoru Massaki > > Sent: Saturday, April 15, 2017 8:03 AM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: How can I set Non-zero return code in DFSORT when SORTOUT record > > count is not zero > > > > 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: mmass...@gmail.com > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- 全先 実 - Minoru Massaki (M*M) E-mail: mmass...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
This is a stand alone sort. Minoru Massaki - (M*M) 2017-04-16 0:13 GMT+09:00 Lizette Koehler : > Is this a stand alone sort, or a program invoked sort? > > Lizette > > > -Original Message- > > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > > Behalf Of Lizette Koehler > > Sent: Saturday, April 15, 2017 8:09 AM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT > record > > count is not zero > > > > What problem are you trying to solve by doing this? > > > > Lizette > > > > > > > -Original Message- > > > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > > > On Behalf Of Minoru Massaki > > > Sent: Saturday, April 15, 2017 8:03 AM > > > To: IBM-MAIN@LISTSERV.UA.EDU > > > Subject: How can I set Non-zero return code in DFSORT when SORTOUT > > > record count is not zero > > > > > > 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: mmass...@gmail.com > > > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- 全先 実 - Minoru Massaki (M*M) E-mail: mmass...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
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. Better to wrap you process with something that can set the RC you want. I sometimes pass output from a utility to REXX and then set my return code in the REXX. You may also want to consider other processes like data base functions (DB2,IMS, VSAM) to better handle your process. Or add different fields in DFSORT for your needs. ICETOOL can provide the way to include different data (say at the end of the record) to provide your flag. I always suggest to find the process that makes the most sense for the requirement, rather than using something just because it is easier or familiar. Sometimes a program (rather than a utility) is the better option. Lizette > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Minoru Massaki > Sent: Saturday, April 15, 2017 8:53 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT record > count is not zero > > There are two large tape volume list files, master and transaction files, and > key is volume serial(VOLSER). > No duplicate VOLSER is in the files (master as well as transaction). > I have to check whether all volumes in the master is processed or not by the > transaction file. > If there is no transaction volumes in the master files, I have to generate > control statements to process the volume. > In this situation, I want to set zero-return code to indicate additional > process is required. > If all volumes in the master file are processed, I want to set zero return > code. > I already have made a DFSORT JOINKEY job to do this process. > Only things I want to do is return code setting such as > RC=0 (No SORTOUT Record): No need additional process > RC=8,12,16 (Non-zero SORTOUT records): Need additional process > > Above is what I like to do in DFSORT. > > Regards, > > Minoru Massaki - (M*M) > > > > 2017-04-16 0:08 GMT+09:00 Lizette Koehler : > > > What problem are you trying to solve by doing this? > > > > Lizette > > > > > > > -Original Message- > > > From: IBM Mainframe Discussion List > > > [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Minoru Massaki > > > Sent: Saturday, April 15, 2017 8:03 AM > > > To: IBM-MAIN@LISTSERV.UA.EDU > > > Subject: How can I set Non-zero return code in DFSORT when SORTOUT > > > record count is not zero > > > > > > 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: mmass...@gmail.com > > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
Pretty trivial to write Rexx to set a return code based on file empty/Not empty. CharlesSent from a mobile; please excuse the brevity. Original message From: Lizette Koehler Date: 4/15/17 12:58 PM (GMT-04:00) To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero 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. Better to wrap you process with something that can set the RC you want. I sometimes pass output from a utility to REXX and then set my return code in the REXX. You may also want to consider other processes like data base functions (DB2,IMS, VSAM) to better handle your process. Or add different fields in DFSORT for your needs. ICETOOL can provide the way to include different data (say at the end of the record) to provide your flag. I always suggest to find the process that makes the most sense for the requirement, rather than using something just because it is easier or familiar. Sometimes a program (rather than a utility) is the better option. Lizette > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Minoru Massaki > Sent: Saturday, April 15, 2017 8:53 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT record > count is not zero > > There are two large tape volume list files, master and transaction files, and > key is volume serial(VOLSER). > No duplicate VOLSER is in the files (master as well as transaction). > I have to check whether all volumes in the master is processed or not by the > transaction file. > If there is no transaction volumes in the master files, I have to generate > control statements to process the volume. > In this situation, I want to set zero-return code to indicate additional > process is required. > If all volumes in the master file are processed, I want to set zero return > code. > I already have made a DFSORT JOINKEY job to do this process. > Only things I want to do is return code setting such as > RC=0 (No SORTOUT Record): No need additional process > RC=8,12,16 (Non-zero SORTOUT records): Need additional process > > Above is what I like to do in DFSORT. > > Regards, > > Minoru Massaki - (M*M) > > > > 2017-04-16 0:08 GMT+09:00 Lizette Koehler : > > > What problem are you trying to solve by doing this? > > > > Lizette > > > > > > > -Original Message- > > > From: IBM Mainframe Discussion List > > > [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Minoru Massaki > > > Sent: Saturday, April 15, 2017 8:03 AM > > > To: IBM-MAIN@LISTSERV.UA.EDU > > > Subject: How can I set Non-zero return code in DFSORT when SORTOUT > > > record count is not zero > > > > > > 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: mmass...@gmail.com > > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
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 To: IBM-MAIN@LISTSERV.UA.EDU 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 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: mmass...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
On Sat, 15 Apr 2017 11:00:57 -0700, Sri h Kolusu wrote: >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 >//* Hmm, Sri, did we forget about the NULLOUT Parm/OPTION? :-)> NULLOUT= RC0 RC4 RC16 Temporarily overrides the NULLOUT installation option, which specifies the action to be taken by DFSORT when there are no records for the SORTOUT data set, as indicated by an OUT count of 0 in message ICE054I RC0 specifies that DFSORT should issue message ICE173I, set a return code of 0, and continue processing when there are no records for the SORTOUT data set. RC4 specifies that DFSORT should issue message ICE173I, set a return code of 4, and continue processing when there are no records for the SORTOUT data set. RC16 specifies that DFSORT should issue message ICE206A, terminate, and give a return code of 16 when there are no records for the SORTOUT data set. -- Dale R. Smith -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
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:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Sri h Kolusu Sent: Saturday, April 15, 2017 2:01 PM To: IBM-MAIN@LISTSERV.UA.EDU 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 To: IBM-MAIN@LISTSERV.UA.EDU 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 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: mmass...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
>>>Hmm, Sri, did we forget about the NULLOUT Parm/OPTION? :-)> Dale, NULLOUT is used to set a return code when there are NO records. OP wanted the opposite. He wants to set a return code when he has at least 1 record, so that it would trigger his additional processing. >>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, I am not sure what keywords/Phrase was used for search, but a simple search for NOTEMPTY in DFSORT Application programming guide will point to the link that I gave earlier. You would have found the same link while searching for EMPTY. Ideally for any question related to DFSORT, I suggest looking in DFSORT Application programming Guide, and if it is an error, then I would start looking in DFSORT Messages and codes manual. Kolusu DFSORT Development -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
@Kolusu, I know how hard good documentation is. I have not looked at your documentation -- I am just citing the empirical evidence that the OP and @Lizette did not find the answer. I am guessing the OP framed the original question as "how do I set a specific RC" and that is the sort of thing he searched for. I just went to KC -- isn't that how we are supposed to be doing things these days? :-( -- and searched on DFSORT plus the subject of this thread. I did not get any hits that seemed immediately relevant, but drilling down on PARM= I found NULLOUT, which at least should have been a start ... Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Sri h Kolusu Sent: Saturday, April 15, 2017 3:36 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero >>>Hmm, Sri, did we forget about the NULLOUT Parm/OPTION? :-)> Dale, NULLOUT is used to set a return code when there are NO records. OP wanted the opposite. He wants to set a return code when he has at least 1 record, so that it would trigger his additional processing. >>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, I am not sure what keywords/Phrase was used for search, but a simple search for NOTEMPTY in DFSORT Application programming guide will point to the link that I gave earlier. You would have found the same link while searching for EMPTY. Ideally for any question related to DFSORT, I suggest looking in DFSORT Application programming Guide, and if it is an error, then I would start looking in DFSORT Messages and codes manual. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
On Sat, 15 Apr 2017 18:18:03 -0400, Charles Mills wrote: >@Kolusu, I know how hard good documentation is. I have not looked at your >documentation -- I am just citing the empirical evidence that the OP and >@Lizette did not find the answer. > >I am guessing the OP framed the original question as "how do I set a >specific RC" and that is the sort of thing he searched for. > >I just went to KC -- isn't that how we are supposed to be doing things these >days? :-( -- and searched on DFSORT plus the subject of this thread. I did >not get any hits that seemed immediately relevant, but drilling down on >PARM= I found NULLOUT, which at least should have been a start ... > "How do I ...?" questions are better answered by a Users Guide than by a Reference Manual. For DFSORT these seem to be a single publication. But a Users guide can't answer every "How" question. It would need to contain an example of every possible program. Does Watson know? On Sun, 16 Apr 2017 00:53:19 +0900, Minoru Massaki wrote: >I have to check whether all volumes in the master is processed or not by >the transaction file. >If there is no transaction volumes in the master files, I have to generate >control statements to process the volume. >In this situation, I want to set zero-return code to indicate additional >process is required. >If all volumes in the master file are processed, I want to set zero return >code. >I already have made a DFSORT JOINKEY job to do this process. > So I wonder whether DFSORT has a construct to report failure if any record in a transaction file is unmatched in the master file? Why not just invert the COND= for the additional processing step? Instead of COND=(0,EQ,DFSORT), code COND=(0,NE,DFSORT)? >Only things I want to do is return code setting such as > RC=0 (No SORTOUT Record): No need additional process > RC=8,12,16 (Non-zero SORTOUT records): Need additional process >Above is what I like to do in DFSORT. > Why not just invert the COND= for the additional processing step? Instead of COND=(0,EQ,DFSORT), code COND=(0,NE,DFSORT)? > (Is anyone so conversant with Assembler as to find the arsy-varsy specification of JCL COND intuitive?) The most common utility to set a condition code is IDCAMS. Something like: EXEC PGM=IDCAMS,COND=(0,EQ,DFSORT) //SYSIN DD * PARM GRAPHICS CHAIN(TN) SET LASTCC=6 ... then test the CC from IDCAMS. (Why does SET limit its argument to 16?) (What does EXEC ...COND= do if the referenced step was not executed? I hate JCL!) Let me assume that your DFSORT step generates a command SYSIN for the "additional processing" step. Is there a construct akin to JOINKEY which will create SORTOUT records for exactly those records in the transaction file which are not matched in the master file? Ideally, your "additional processing" program should acept an empty SYSIN, do nothing, and quietly exit with CC=0. You would incur only the minuscule overhead of job step initiation and termination. Too many IBM facilities can't do nothing without reporting an error. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
>>I am guessing the OP framed the original question as "how do I set a specific RC" and that is the sort of thing he searched for. Charles, "How do I" questions cannot be answered in application programming guide. We have Smart DFSORT tricks page which shows you clever ways to use DFSORT and ICETOOL to solve common problems. And for the record we already have that trick "Set RC of 12, 8 or 4 if file is empty, has more than n records, etc" which is available here http://www-01.ibm.com/support/docview.wss?uid=isg3T794 >>I just went to KC -- isn't that how we are supposed to be doing things these days? :-( -- and searched on DFSORT plus the subject of this thread. I did not get any hits that seemed immediately relevant, but drilling down on PARM= I found NULLOUT, which at least should have been a start .. OP knew about the NULLOUT parm as his initial post mentions this "I know that setting non-zero return code when SORTOUT record count is zero." >>>@Kolusu, I know how hard good documentation is. I have not looked at your documentation -- I am just citing the empirical evidence that the OP and @Lizette did not find the answer. We put in a lot of effort in designing the features to match the user requirements. In this case an ideal search would be "NOTEMPTY" or "EMPTY" and "how do I". So If it is used that as a search key they would have found the answer. It gets difficult to document catering to "how do I" and even if we did we wouldn't cover all scenarios. >>"How do I ...?" questions are better answered by a Users Guide than by a Reference Manual. For DFSORT these seem to be a single publication. But a Users guide can't answer every "How" question. It would need to contain an example of every possible program. Paul, DFSORT does have other publications like "Getting Started". If users are not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T780 P.S: It still will not answer questions with "How do I.." type questions Some of the possible "how to" questions are answered via DFSORT smart tricks page and this particular scenario is already covered in that publication. >>So I wonder whether DFSORT has a construct to report failure if any record in a transaction file is unmatched in the master file? DFSORT has an indicator as part of the record to indicate where the key was found in the joined records ('B' for key found in F1 and F2, '1' for key found in F1 only, or '2' for key found in F2 only). So the user can use that indicator to process/generate data/sysin cards. >> Let me assume that your DFSORT step generates a command SYSIN for the "additional processing" step. Is there a construct akin to JOINKEY which will create SORTOUT records for exactly those records in the transaction file which are not matched in the master file? DFSORT does the ability to create any type of sysin control cards. There is very little information here for me to show how to generate those control cards. If OP can send/show his desired additional processing control cards and Joinkeys sysin cards, I can show him a way of generated the control cards. >>Ideally, your "additional processing" program should acept an empty SYSIN, do nothing, and quietly exit with CC=0. This should be ideal scenario, have the sysin statements needed for additional processing generated by DFSORT. If there are no control statements to be generated then other step shouldn't have any problem. just start and finish. Thanks, Kolusu DFSORT Development -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
>>>In this case an ideal search would be "NOTEMPTY" or "EMPTY" and "how do I". My apologies. I was missing a NOT in the statement. Please read it as In this case an ideal search would be "NOTEMPTY" or "EMPTY" and NOT "how do I". Thanks, Kolusu DFSORT Development IBM Mainframe Discussion List wrote on 04/15/2017 04:46:00 PM: > From: Sri h Kolusu/Silicon Valley/IBM@IBMUS > To: IBM-MAIN@LISTSERV.UA.EDU > Date: 04/15/2017 04:46 PM > Subject: Re: How can I set Non-zero return code in DFSORT when > SORTOUT record count is not zero > Sent by: IBM Mainframe Discussion List > > >>I am guessing the OP framed the original question as "how do I set a > specific RC" and that is the sort of thing he searched for. > > Charles, > > "How do I" questions cannot be answered in application programming guide. > We have Smart DFSORT tricks page which shows you clever ways to use DFSORT > and ICETOOL to solve common problems. And for the record we already have > that trick "Set RC of 12, 8 or 4 if file is empty, has more than n > records, etc" which is available here > > http://www-01.ibm.com/support/docview.wss?uid=isg3T794 > > >>I just went to KC -- isn't that how we are supposed to be doing things > these days? :-( -- and searched on DFSORT plus the subject of this thread. > I did not get any hits that seemed immediately relevant, but drilling down > on PARM= I found NULLOUT, which at least should have been a start .. > > OP knew about the NULLOUT parm as his initial post mentions this "I know > that setting non-zero return code when SORTOUT record count is zero." > > >>>@Kolusu, I know how hard good documentation is. I have not looked at > your documentation -- I am just citing the empirical evidence that the OP > and @Lizette did not find the answer. > > We put in a lot of effort in designing the features to match the user > requirements. In this case an ideal search would be "NOTEMPTY" or "EMPTY" > and "how do I". So If it is used that as a search key they would have > found the answer. It gets difficult to document catering to "how do I" > and even if we did we wouldn't cover all scenarios. > > >>"How do I ...?" questions are better answered by a Users Guide than by a > Reference Manual. For DFSORT these seem to be a single publication. But a > Users guide can't answer every "How" question. It would need to contain > an example of every possible program. > > Paul, > > DFSORT does have other publications like "Getting Started". If users are > not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through > "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of > examples, that will show you how to use DFSORT, DFSORT's ICETOOL and > DFSORT Symbols. You can access it online, along with all of the other > DFSORT books, from: > > http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T780 > > P.S: It still will not answer questions with "How do I.." type questions > > Some of the possible "how to" questions are answered via DFSORT smart > tricks page and this particular scenario is already covered in that > publication. > > >>So I wonder whether DFSORT has a construct to report failure if any > record in a transaction file is unmatched in the master file? > > DFSORT has an indicator as part of the record to indicate where the key > was found in the joined records ('B' for key found in F1 and F2, '1' for > key found in F1 only, or '2' for key found in F2 only). > > So the user can use that indicator to process/generate data/sysin cards. > > >> Let me assume that your DFSORT step generates a command SYSIN for the > "additional processing" step. Is there a construct akin to JOINKEY which > will create SORTOUT records for exactly those records in the transaction > file which are not matched in the master file? > > DFSORT does the ability to create any type of sysin control cards. There > is very little information here for me to show how to generate those > control cards. If OP can send/show his desired additional processing > control cards and Joinkeys sysin cards, I can show him a way of generated > the control cards. > > >>Ideally, your "additional processing" program should acept an empty > SYSIN, do nothing, and quietly exit with CC=0. > > This should be ideal scenario, have the sysin statement
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
On Sat, 15 Apr 2017 12:35:58 -0700, Sri h Kolusu wrote: Hmm, Sri, did we forget about the NULLOUT Parm/OPTION? :-)> > >Dale, > >NULLOUT is used to set a return code when there are NO records. OP wanted >the opposite. He wants to set a return code when he has at least 1 record, >so that it would trigger his additional processing. Right now, the return code is 0 when the file is empty or when it is not empty. If he coded NULLOUT=RC4 then the return code would be 4 if the file is empty. Doesn't that imply that the return code would be 0 if the file is not empty? :-) RC=0 file is not empty, RC=4 file is empty, RC=nn error -- Dale R. Smith -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
Kolusu-san, Thank you very much for telling me to use COUNT operator of ICETOOL. It is what I'm looking for. A customer wants to tell auto job scheduling/auto operation system to take another/additional action by Non-Zero return code if generated record is non-rezo. Why we want to use DFSORT instead of small REXX program is following; If we want to run a program written by someone on their production systems, several approval processes are required, even if the program is very small and is written by REXX. In their category, DFSORT is proved utility program and is NOT a program written by programming language, even if its SORT control cars are very complex over a very simple REXX EXEC. ;-) Again, Kolusu-san and other experts, I really appreciate your kind help. Regards, Minoru Massaki - (M*M) 2017-04-16 3:00 GMT+09:00 Sri h Kolusu : > 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 > To: IBM-MAIN@LISTSERV.UA.EDU > 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 > > > > 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: mmass...@gmail.com > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > > > > > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- 全先 実 - Minoru Massaki (M*M) E-mail: mmass...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
On Mon, 17 Apr 2017 17:53:40 +0900, Minoru Massaki wrote: > >A customer wants to tell auto job scheduling/auto operation system to take >another/additional action by Non-Zero return code if generated record is >non-rezo. >Why we want to use DFSORT instead of small REXX program is following; >If we want to run a program written by someone on their production systems, >several approval processes are required, even if the program is very small >and is written by REXX. >In their category, DFSORT is proved utility program and is NOT a program >written by programming language, > Rules, rules, rules! But I would hardly be surprised if the DFSORT control cards were shown to be Turing-complete in which case they must be considered a pogramming language. (Don't tell your customer, who seems determined to use JCL as if it were a programming language.) (Does DFSORT in some cases compile its key definitions into executable code?) >even if its SORT control cars are very complex over a very simple REXX >EXEC. ;-) > A very simple Rexx EXEC might use a compound symbol as a table. For large data sets this is inappropriate and JOINKEYS/COUNT is more suitable. >Again, Kolusu-san and other experts, I really appreciate your kind help. > Kolusu's dedication to customer support here is commendable. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
> Does DFSORT in some cases compile its key definitions into executable code? Sorts have "compiled" their key compares into executable code for as long as I can recall. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Monday, April 17, 2017 9:45 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero On Mon, 17 Apr 2017 17:53:40 +0900, Minoru Massaki wrote: > >A customer wants to tell auto job scheduling/auto operation system to >take another/additional action by Non-Zero return code if generated >record is non-rezo. >Why we want to use DFSORT instead of small REXX program is following; >If we want to run a program written by someone on their production >systems, several approval processes are required, even if the program >is very small and is written by REXX. >In their category, DFSORT is proved utility program and is NOT a >program written by programming language, > Rules, rules, rules! But I would hardly be surprised if the DFSORT control cards were shown to be Turing-complete in which case they must be considered a pogramming language. (Don't tell your customer, who seems determined to use JCL as if it were a programming language.) (Does DFSORT in some cases compile its key definitions into executable code?) >even if its SORT control cars are very complex over a very simple REXX >EXEC. ;-) > A very simple Rexx EXEC might use a compound symbol as a table. For large data sets this is inappropriate and JOINKEYS/COUNT is more suitable. >Again, Kolusu-san and other experts, I really appreciate your kind help. > Kolusu's dedication to customer support here is commendable. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
AW: Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
> Why not just invert the COND= for the additional processing step? > Instead of COND=(0,EQ,DFSORT), code COND=(0,NE,DFSORT)? Back in the days when the need JCL was designed, people recognized the need for conditional execution of a job step. However, it was already late in the afternoon, and there was that big party tonight, so people decided to postpone further work and go off to the party. They enjoyed, they really enjoyed Next day, people slowly appeared at work, and, still in a drunken stupor, started to design the conditional step execution solution. COND= was chosen to be the best solution they found. While I made this up, I have a hard time to imagine it did not happen that way. How else would can explain the weird logic behind COND= ? But then IBM recently thought of this better and invented JCL IF-THEN-ELSE. This was published with MVS/ESA some 28+ years ago. But even now, people still use the wonderful COND=. No offence intended. Happy Easter, everybody --Peter Hunkeler -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: AW: Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
Sounds like a CONd job to me -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Peter Hunkeler Sent: Sunday, April 16, 2017 3:14 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [IBM-MAIN] AW: Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero > Why not just invert the COND= for the additional processing step? > Instead of COND=(0,EQ,DFSORT), code COND=(0,NE,DFSORT)? Back in the days when the need JCL was designed, people recognized the need for conditional execution of a job step. However, it was already late in the afternoon, and there was that big party tonight, so people decided to postpone further work and go off to the party. They enjoyed, they really enjoyed Next day, people slowly appeared at work, and, still in a drunken stupor, started to design the conditional step execution solution. COND= was chosen to be the best solution they found. While I made this up, I have a hard time to imagine it did not happen that way. How else would can explain the weird logic behind COND= ? But then IBM recently thought of this better and invented JCL IF-THEN-ELSE. This was published with MVS/ESA some 28+ years ago. But even now, people still use the wonderful COND=. No offence intended. Happy Easter, everybody --Peter Hunkeler -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: AW: Re: How can I set Non-zero return code in DFSORT when SORTOUT record count is not zero
On Sun, 16 Apr 2017 09:14:01 +0200, Peter Hunkeler wrote: > > >While I made this up, I have a hard time to imagine it did not happen that >way. How else would can explain the weird logic behind COND= ? > Assembler mentality. It's the CC mask for a BC to branch around the next step. >But then IBM recently thought of this better and invented JCL IF-THEN-ELSE. >This was published with MVS/ESA some 28+ years ago. But even now, people still >use the wonderful COND=. > Yes, but is there a concise IF-THEN-ELSE to unconditionally suppress execution of a step; equivalent to COND=(0,LE)? (As long as it's not the first step. Grrr.) And, why, why, why doesn't the parser require that label fields match on corresponding IF, THEN, and ELSE statements? For error checking. And why isn't there an ELSEIF? I hate JCL! They could have done better. IBM doesn't care. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN