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 [email protected] with the message: INFO IBM-MAIN