Re: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Cameron Conacher
The situation is that I have three different environments.
If we are in development, lets ignore the email
If we are in pre-prod, let’s assume someone is perform a User Acceptance test.
If we are in production, we should jump in and deal with remediation.

When the email is sent, I have embedded Symbolics in the email text itself, 
meaning I need to use  //SYSUT1   DD  *,SYMBOLS=EXECSYS, with IEBGENER.

In this situation, I cannot put the email text in a PDS as I would not be able 
to use the SYSBOLS= clause with IEBGENER,
On the other hand I could put all the email text into a PDS member, and 
pre-process this email text performing all the Symbolic substitutions, and 
create a temp file that has already had all of the substitution performed, pass 
it to IEBGENER without the SYMBOLS= clause, and go from there.
Sri, showed me how to gather the available data from the existing System 
Symbolics, and I can pass other data I need via PARMs.
So I am all good to go now.

However, I am going to look into writing a tiny C program, that I can call as a 
utility to assign a return code value. Just to see what it takes.

I was looking to run a utility that would simply generate a Return Code value, 
I could use to conditionally execute a JOBSTEP.


Thanks

…….Cameron

From: IBM Mainframe Discussion List  On Behalf Of 
Michael Oujesky
Sent: Monday, March 4, 2024 12:38 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Can DFSORT assign custom Return Code values?

Presuming these are three different z/OS instances. why not just use system 
symbols to make the determination of what environment is being used? Michael At 
10: 12 AM 3/4/2024, Sri Hari Kolusu wrote: >Content-Transfer-Encoding: base64>>


Presuming these are three different z/OS instances. why not just use

system symbols to make the determination of what environment is being used?



Michael



At 10:12 AM 3/4/2024, Sri Hari Kolusu wrote:

>Content-Transfer-Encoding: base64>> I was to be able to assign one

>of three different Return Code values (any value) that I can let

>check to determine if I am running in Development, Pre-Prod or

>Production, and then execute steps related to the specific environment.

>Not something I absolutely need since I could write a tiny program for this.

>

>Cameron,

>

>DFSORT has limited ability to set a return code but not the way you

>want. However, I think we can solve your issue quite easily by

>validating the symbol and only generating the steps that needs to

>run for that Symbolic. Remember DFSORT has the ability of reading

>the system symbols and determine the LPAR it is running.

>

>Please send an offline email with your complete requirement and I

>will show you a way to do it.

>

>Thanks,

>Kolusu

>DFSORT Development

>IBM Corporation

>

>--

>For IBM-MAIN subscribe / signoff / archive access instructions,

>send email to lists...@listserv.ua.edu<mailto: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<mailto:lists...@listserv.ua.edu> with 
the message: INFO IBM-MAIN


American Express made the following annotations

This e-mail was sent to you by a representative of Amex Bank of Canada, P.O. 
Box 3204, Station "F", Toronto, ON, M1W 3W7, www.americanexpress.ca. If you no 
longer wish to receive these e-mails, please notify the sender by reply e-mail.

This e-mail is solely for the intended recipient and may contain confidential 
or privileged information. If you are not the intended recipient, any 
disclosure, copying, use, or distribution of the information included in this 
e-mail is prohibited. If you have received this e-mail in error, please notify 
the sender by reply e-mail and immediately and permanently delete this e-mail 
and any attachments. Thank you.

American Express a fait les remarques suivantes
Ce courriel vous a été envoyé par un représentant de la Banque Amex du Canada, 
C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7, www.americanexpress.ca. Si, 
par la suite, vous ne souhaitez plus recevoir ces courriels, veuillez en aviser 
les expéditeurs par courriel.

Ce courriel est réservé au seul destinataire indiqué et peut renfermer des 
renseignements confidentiels et privilégiés. Si vous n’êtes pas le destinataire 
prévu, toute divulgation, duplication, utilisation ou distribution du courriel 
est interdite. Si vous avez reçu ce courriel par erreur, veuillez en aviser 
l’expéditeur par courriel et détruire immédiatement le courriel et toute pièce 
jointe. Merci.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Binyamin Dissen
Not exactly sure what you are trying to do, but .

it should be a simple rexx procedure 

/* REXX */   
STRING = "TEST PROD WHATEVER"
RCS = "4 8 12"   
 
DO  JJ = 1 TO WORDS(STRING)  
IF  WORD(STRING,JJ) = ARG(1)  THEN  RETURN WORD(RCS,JJ)  
END  
RETURN 102   

Invoke it with 

//   EXEC  PGM=IKJEFT1B,PARM='%SILLYREX '

And this step will set RC to the translated string value.


On Mon, 4 Mar 2024 16:01:51 + Cameron Conacher
<03cfc59146bb-dmarc-requ...@listserv.ua.edu> wrote:

:>Hello everyone,
:>From what I have read this is not possible, but I decided to throw it out 
there to see if something is possible.
:>
:>I have a block of JCL with a bunch of steps.
:>I have symbolic parameters assigned. (JP1/JP2 SYSPLEX Symbolics for DFSORT)
:>
:>I was looking for a Utility that would examine the value of a Symbolic and 
assign a User Return Coe value. RC1 = Development; RC2 = Pre-Production; RC3 = 
Production?
:>I need a Return Code value to be able to conditionally execute subsequent JOB 
steps. I cannot execute steps conditionally based on Symbolic Variable values.
:>IF Step001.RC = 0 ….Development
:>
:>I could write a tine program to do this.
:>I was hunting around for a utility to do this.
:>DFSORT is my go to Utility but as mentioned, I believe it is not suitable for 
this task.
:>I believe I could set RC0 or RC4 or RC16. RC0 and RC4 generate a message and 
continue, but RC16 generates a message and terminates. I think this 
(Termination) would be unsuitable.
:>
:>I was to be able to assign one of three different Return Code values (any 
value) that I can let check to determine if I am running in Development, 
Pre-Prod or Production, and then execute steps related to the specific 
environment.
:>Not something I absolutely need since I could write a tiny program for this.
:>
:>Just curious, and I think my ADHD has just sent me down another rabbit hole ?
:>
:>I could do this in Easytrieve. Or COBOL. Or Assembler. Or Rexx. Or …..
:>
:>Hope this makes sense.
:>
:>Thanks
:>
:>
:>Cameron Conacher
:>Senior Engineer
:>
:>American Express Canada Inc.
:>GCICS
:>2225 Sheppard Avenue East, Toronto, ON  M2J 5C2
:>
:>cameron.conac...@aexp.com
:>Office: 1-437-836-5265
:>Mobile: 1-416-409-5147
:>
:>https://amex.webex.com/join/cameron.conacher
:>
:>
:>
:>
:>American Express made the following annotations
:>
:>This e-mail was sent to you by a representative of Amex Bank of Canada, P.O. 
Box 3204, Station "F", Toronto, ON, M1W 3W7, www.americanexpress.ca. If you no 
longer wish to receive these e-mails, please notify the sender by reply e-mail.
:>
:>This e-mail is solely for the intended recipient and may contain confidential 
or privileged information. If you are not the intended recipient, any 
disclosure, copying, use, or distribution of the information included in this 
e-mail is prohibited. If you have received this e-mail in error, please notify 
the sender by reply e-mail and immediately and permanently delete this e-mail 
and any attachments. Thank you.
:>
:>American Express a fait les remarques suivantes
:>Ce courriel vous a été envoyé par un représentant de la Banque Amex du 
Canada, C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7, 
www.americanexpress.ca. Si, par la suite, vous ne souhaitez plus recevoir ces 
courriels, veuillez en aviser les expéditeurs par courriel.
:>
:>Ce courriel est réservé au seul destinataire indiqué et peut renfermer des 
renseignements confidentiels et privilégiés. Si vous n’êtes pas le destinataire 
prévu, toute divulgation, duplication, utilisation ou distribution du courriel 
est interdite. Si vous avez reçu ce courriel par erreur, veuillez en aviser 
l’expéditeur par courriel et détruire immédiatement le courriel et toute pièce 
jointe. Merci.
:>
:>--
:>For IBM-MAIN subscribe / signoff / archive access instructions,
:>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Sri Hari Kolusu
>> Another simple way to do this is a simple Rexx exec using MVSVAR to get the 
>> system symbol that you want . See 
>> https://www.ibm.com/docs/en/zos/2.5.0?topic=tef-mvsvar to see examples of 
>> how to do this.

Doug,

As I mentioned earlier you don't need REXX to get the MVS variables. DFSORT is 
quite capable of reading the SYSTEM symbols.  If your system has all the 
symbols defined, then you can use the following DFSORT JCL

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SYMNOUT  DD SYSOUT=*
//SYMNAMES DD *
SYM01,S''
SYM02,S''
SYM03,S''
SYM04,S''
SYM05,S''
SYM06,S''
SYM07,S''
SYM08,S''
SYM09,S''
SYM10,S''
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSINDD *
  OPTION COPY
  OUTFIL BUILD=(C'SYSAPPCLU IS : ',SYM01,/,
C'SYSDFPIS : ',SYM02,/,
C'SYSMVSIS : ',SYM03,/,
C'SYSNAME   IS : ',SYM04,/,
C'SYSOPSYS  IS : ',SYM05,/,
C'SYSSECLAB IS : ',SYM06,/,
C'SYSSMFID  IS : ',SYM07,/,
C'SYSSMSIS : ',SYM08,/,
C'SYSCLONE  IS : ',SYM09,/,
C'SYSPLEX   IS : ',SYM10)
/*

https://www.ibm.com/docs/en/zos/3.1.0?topic=ss-symbol-statements

Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Michael Oujesky
Presuming these are three different z/OS instances. why not just use 
system symbols to make the determination of what environment is being used?


Michael

At 10:12 AM 3/4/2024, Sri Hari Kolusu wrote:
Content-Transfer-Encoding: base64>> I was to be able to assign one 
of three different Return Code values (any value) that I can let 
check to determine if I am running in Development, Pre-Prod or 
Production, and then execute steps related to the specific environment.

Not something I absolutely need since I could write a tiny program for this.

Cameron,

DFSORT has limited ability to set a return code but not the way you 
want. However, I think we can solve your issue quite easily by 
validating the symbol and only generating the steps that needs to 
run for that Symbolic. Remember DFSORT has the ability of reading 
the system symbols and determine the LPAR it is running.


Please send an offline email with your complete requirement and I 
will show you a way to do it.


Thanks,
Kolusu
DFSORT Development
IBM Corporation

--
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: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Robert Prins
On Mon, 4 Mar 2024 at 16:13, Sri Hari Kolusu  wrote:

> Please send an offline email with your complete requirement and I will
> show you a way to do it.
>

After all, why would anyone else be interested in it?

Robert
-- 
Robert AH Prins
robert(a)prino(d)org
The hitchhiking grandfather 
Some REXX code for use on z/OS


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Robert Prins
Or this, posted on  @ Tue
Jul 28, 2009 11:59 pm

//* Use a tiny Rexx exec to check both month and year
//* If 1st of month, return number of month, else return 99
//MAKEREXX EXEC PGM=IEBUPDTE,PARM=NEW
//SYSINDD  DATA
./ADD   NAME=CHKDATE
 if substr(date(u),4,2)=1 then return substr(date(u),1,2); return 99
/*
//SYSUT2   DD  DISP=(,PASS),SPACE=(TRK,(1,1,2),RLSE),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=80,DSORG=PS,RECFM=F)
//SYSPRINT DD  DUMMY
//*  Now run the exec to get a return code
//SETMAXCC EXEC PGM=IRXJCL,PARM='CHKDATE'
//SYSEXEC  DD  DSNAME=*.MAKEREXX.SYSUT2,DISP=(OLD,DELETE)
//SYSTSIN  DD  DUMMY
//SYSTSPRT DD  DUMMY
/*  Proceed as in other solutions
//JAN  EXEC PGM=IEFBR14,COND=(1,NE,SETMAXCC)
//*
//FEB  EXEC PGM=IEFBR14,COND=(2,NE,SETMAXCC)
//*
// ...

On Mon, 4 Mar 2024 at 16:02, Cameron Conacher <
03cfc59146bb-dmarc-requ...@listserv.ua.edu> wrote:

> Hello everyone,
> From what I have read this is not possible, but I decided to throw it out
> there to see if something is possible.
>
> I have a block of JCL with a bunch of steps.
> I have symbolic parameters assigned. (JP1/JP2 SYSPLEX Symbolics for DFSORT)
>
> I was looking for a Utility that would examine the value of a Symbolic and
> assign a User Return Coe value. RC1 = Development; RC2 = Pre-Production;
> RC3 = Production?
> I need a Return Code value to be able to conditionally execute subsequent
> JOB steps. I cannot execute steps conditionally based on Symbolic Variable
> values.
> IF Step001.RC = 0 ….Development
>
> I could write a tine program to do this.
> I was hunting around for a utility to do this.
> DFSORT is my go to Utility but as mentioned, I believe it is not suitable
> for this task.
> I believe I could set RC0 or RC4 or RC16. RC0 and RC4 generate a message
> and continue, but RC16 generates a message and terminates. I think this
> (Termination) would be unsuitable.
>
> I was to be able to assign one of three different Return Code values (any
> value) that I can let check to determine if I am running in Development,
> Pre-Prod or Production, and then execute steps related to the specific
> environment.
> Not something I absolutely need since I could write a tiny program for
> this.
>
> Just curious, and I think my ADHD has just sent me down another rabbit
> hole 
>
> I could do this in Easytrieve. Or COBOL. Or Assembler. Or Rexx. Or …..
>
> Hope this makes sense.
>
> Thanks
>
>
> Cameron Conacher
> Senior Engineer
>
> American Express Canada Inc.
> GCICS
> 2225 Sheppard Avenue East, Toronto, ON  M2J 5C2
>
> cameron.conac...@aexp.com
> Office: 1-437-836-5265
> Mobile: 1-416-409-5147
>
> https://amex.webex.com/join/cameron.conacher
>
>
>
> 
> American Express made the following annotations
> 
> This e-mail was sent to you by a representative of Amex Bank of Canada,
> P.O. Box 3204, Station "F", Toronto, ON, M1W 3W7, www.americanexpress.ca.
> If you no longer wish to receive these e-mails, please notify the sender by
> reply e-mail.
>
> This e-mail is solely for the intended recipient and may contain
> confidential or privileged information. If you are not the intended
> recipient, any disclosure, copying, use, or distribution of the information
> included in this e-mail is prohibited. If you have received this e-mail in
> error, please notify the sender by reply e-mail and immediately and
> permanently delete this e-mail and any attachments. Thank you.
>
> American Express a fait les remarques suivantes
> Ce courriel vous a été envoyé par un représentant de la Banque Amex du
> Canada, C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7,
> www.americanexpress.ca. Si, par la suite, vous ne souhaitez plus recevoir
> ces courriels, veuillez en aviser les expéditeurs par courriel.
>
> Ce courriel est réservé au seul destinataire indiqué et peut renfermer des
> renseignements confidentiels et privilégiés. Si vous n’êtes pas le
> destinataire prévu, toute divulgation, duplication, utilisation ou
> distribution du courriel est interdite. Si vous avez reçu ce courriel par
> erreur, veuillez en aviser l’expéditeur par courriel et détruire
> immédiatement le courriel et toute pièce jointe. Merci.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>


-- 
Robert AH Prins
robert(a)prino(d)org
The hitchhiking grandfather 
Some REXX code for use on z/OS


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Doug Henry
Another simple way to do this is a simple Rexx exec using MVSVAR to get the 
system symbol that you want . See 
https://www.ibm.com/docs/en/zos/2.5.0?topic=tef-mvsvar to see examples of how 
to do this.

Doug  
On Mon, 4 Mar 2024 16:01:51 +, Cameron Conacher  
wrote:

>Hello everyone,
>From what I have read this is not possible, but I decided to throw it out 
>there to see if something is possible.
>
>I have a block of JCL with a bunch  f steps.
>I have symbolic parameters assigned. (JP1/JP2 SYSPLEX Symbolics for DFSORT)
>
>I was looking for a Utility that would examine the value of a Symbolic and 
>assign a User Return Coe value. RC1 = Development; RC2 = Pre-Production; RC3 = 
>Production?
>I need a Return Code value to be able to conditionally execute subsequent JOB 
>steps. I cannot execute steps conditionally based on Symbolic Variable values.
>IF Step001.RC = 0 ….Development
>
>I could write a tine program to do this.
>I was hunting around for a utility to do this.
>DFSORT is my go to Utility but as mentioned, I believe it is not suitable for 
>this task.
>I believe I could set RC0 or RC4 or RC16. RC0 and RC4 generate a message and 
>continue, but RC16 generates a message and terminates. I think this 
>(Termination) would be unsuitable.
>
>I was to be able to assign one of three different Return Code values (any 
>value) that I can let check to determine if I am running in Development, 
>Pre-Prod or Production, and then execute steps related to the specific 
>environment.
>Not something I absolutely need since I could write a tiny program for this.
>
>Just curious, and I think my ADHD has just sent me down another rabbit hole 
>
>I could do this in Easytrieve. Or COBOL. Or Assembler. Or Rexx. Or …..
>
>Hope this makes sense.
>
>Thanks
>
>
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Colin Paice
I think I did what you want, many years ago.
A very small C program something like
int main(argc,argv)
{
if (strcmp(argv[1],argv[2]) == 0 return 0
else return 4;
}
//S1 EXEC PGM=IFPROG,PARM="DEV,"
// if S1.RC == 0  they are the same

Colin



On Mon, 4 Mar 2024 at 16:02, Cameron Conacher <
03cfc59146bb-dmarc-requ...@listserv.ua.edu> wrote:

> Hello everyone,
> From what I have read this is not possible, but I decided to throw it out
> there to see if something is possible.
>
> I have a block of JCL with a bunch of steps.
> I have symbolic parameters assigned. (JP1/JP2 SYSPLEX Symbolics for DFSORT)
>
> I was looking for a Utility that would examine the value of a Symbolic and
> assign a User Return Coe value. RC1 = Development; RC2 = Pre-Production;
> RC3 = Production?
> I need a Return Code value to be able to conditionally execute subsequent
> JOB steps. I cannot execute steps conditionally based on Symbolic Variable
> values.
> IF Step001.RC = 0 ….Development
>
> I could write a tine program to do this.
> I was hunting around for a utility to do this.
> DFSORT is my go to Utility but as mentioned, I believe it is not suitable
> for this task.
> I believe I could set RC0 or RC4 or RC16. RC0 and RC4 generate a message
> and continue, but RC16 generates a message and terminates. I think this
> (Termination) would be unsuitable.
>
> I was to be able to assign one of three different Return Code values (any
> value) that I can let check to determine if I am running in Development,
> Pre-Prod or Production, and then execute steps related to the specific
> environment.
> Not something I absolutely need since I could write a tiny program for
> this.
>
> Just curious, and I think my ADHD has just sent me down another rabbit
> hole 
>
> I could do this in Easytrieve. Or COBOL. Or Assembler. Or Rexx. Or …..
>
> Hope this makes sense.
>
> Thanks
>
>
> Cameron Conacher
> Senior Engineer
>
> American Express Canada Inc.
> GCICS
> 2225 Sheppard Avenue East, Toronto, ON  M2J 5C2
>
> cameron.conac...@aexp.com
> Office: 1-437-836-5265
> Mobile: 1-416-409-5147
>
> https://amex.webex.com/join/cameron.conacher
>
>
>
> 
> American Express made the following annotations
> 
> This e-mail was sent to you by a representative of Amex Bank of Canada,
> P.O. Box 3204, Station "F", Toronto, ON, M1W 3W7, www.americanexpress.ca.
> If you no longer wish to receive these e-mails, please notify the sender by
> reply e-mail.
>
> This e-mail is solely for the intended recipient and may contain
> confidential or privileged information. If you are not the intended
> recipient, any disclosure, copying, use, or distribution of the information
> included in this e-mail is prohibited. If you have received this e-mail in
> error, please notify the sender by reply e-mail and immediately and
> permanently delete this e-mail and any attachments. Thank you.
>
> American Express a fait les remarques suivantes
> Ce courriel vous a été envoyé par un représentant de la Banque Amex du
> Canada, C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7,
> www.americanexpress.ca. Si, par la suite, vous ne souhaitez plus recevoir
> ces courriels, veuillez en aviser les expéditeurs par courriel.
>
> Ce courriel est réservé au seul destinataire indiqué et peut renfermer des
> renseignements confidentiels et privilégiés. Si vous n’êtes pas le
> destinataire prévu, toute divulgation, duplication, utilisation ou
> distribution du courriel est interdite. Si vous avez reçu ce courriel par
> erreur, veuillez en aviser l’expéditeur par courriel et détruire
> immédiatement le courriel et toute pièce jointe. Merci.
>
> --
> 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: Can DFSORT assign custom Return Code values?

2024-03-04 Thread Sri Hari Kolusu
>> I was to be able to assign one of three different Return Code values (any 
>> value) that I can let check to determine if I am running in Development, 
>> Pre-Prod or Production, and then execute steps related to the specific 
>> environment.
Not something I absolutely need since I could write a tiny program for this.

Cameron,

DFSORT has limited ability to set a return code but not the way you want. 
However, I think we can solve your issue quite easily by validating the symbol 
and only generating the steps that needs to run for that Symbolic. Remember 
DFSORT has the ability of reading the system symbols and determine the LPAR it 
is running.

Please send an offline email with your complete requirement and I will show you 
a way to do it.

Thanks,
Kolusu
DFSORT Development
IBM Corporation

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN