You may want to set:
AOP_MVS_RETURN_CODES
Specifies whether the afpxpcl, afpxpdf, and afpxps commands return MVS
return codes or UNIX exit values:
Value
Meaning
YES
MVS return codes:
0
Successful.
4
A warning occurred during the transform.
8
The command was not accepted, a data stream error occurred during
the transform, or the transform failed.
NO
UNIX exit values:
0
Successful. However, a warning or data stream error might have
occurred during the transform.
1
The command was not accepted, or the transform failed.
Also AOPBATCH is part of the INFOPrint service (or whatever it is called) and
instead you may want to use BPXBATCH (or BPXBATSL) which are part of base
z/OS. This you may have to test, because in your AWK example, I believe "Exit
4" will generate 256*4 or 1024, I think. The doc says:
"other multiples of 256
A return code greater than 255, unless explicitly documented as a return
code from BPXBATCH (32000 or 32512), is actually an exit status being returned
from the program that was invoked by BPXBATCH. The exit status can be
determined by dividing the value of BPXYWAST by 256."
"BPXYWAST
BPXBATCH invoked the BPX1FRK (fork) callable service. This is usually
invoked only by a TSO/E user. Processing was successful with wait() status
containing a nonzero value. The wait status was mapped by BPXYWAST and returned
by BPX1WAT (wait)."
The above information is from z/OS 1.13 documentation, I am going to z/OS 2.02,
but not there yet, so I did not check to see if there are any differences.
Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Farley, Peter x23353
Sent: Friday, May 13, 2016 1:16 PM
To: [email protected]
Subject: Re: Suggestion for conditioning step on symbols
I don't have a solution for the string comparison issue, but the DISP=NEW issue
I can tell you with confidence "just works" under JES2. For either a COND= or
an IF bypass of a step, all of the DD's are bypassed and no allocation error
occurs. I use this feature all the time in my testing.
For JES3 I'm not sure if it works the same, someone with JES3 experience will
have to advise you on that.
HTH
Peter
P.S. -- I tried the following trick for string compares but the return code is
still 0 and not 4 as one might hope:
// SET S1=ABCD
// SET S2=DEFG
//*
//TESTSTR EXEC PGM=AOPBATCH,REGION=32M,
// PARM='awk BEGIN {if ("&S1" == "&S2") exit 0; else exit 4}'
//STDOUT DD SYSOUT=*,RECFM=VA,LRECL=250,BLKSIZE=254
//STDERR DD SYSOUT=*
//STDIN DD DUMMY
//*
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Charles Mills
Sent: Friday, May 13, 2016 12:40 PM
To: [email protected]
Subject: Suggestion for conditioning step on symbols
I know this has been kicked around before but I don't have a good answer off
the top of my head and I don't know exactly how to Google for the answer.
Does anyone have suggestions for conditioning a jobstep on &symbol1 !=
&symbol2? I know that COND= and IF are only on return codes and similar things,
not character strings.
I could write Rexx that would compare two symbols (or evaluate a complex
expression) and set a return code -- is that the best approach? Or is there
something off the shelf that would have the same effect? I have a feeling
someone here knows a clever hack.
Complicating life is that part of what I need to bypass if &symbol1 ==
&symbol2 is a DD with DISP=NEW. Can IF bypass an entire step including DDs
(such that DISP=NEW for an existing dataset will not cause errors)? The
examples do not show that. If not, do I solve that by putting the DD (and EXEC
PGM=) in a PROC and IF/ELSE executing one of two alternative PROCs? Or ... ?
Charles
--
This message and any attachments are intended only for the use of the addressee
and may contain information that is privileged and confidential. If the reader
of the message is not the intended recipient or an authorized representative of
the intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and delete the message and any
attachments from your system.
----------------------------------------------------------------------
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