Re: Edit macro to support jcl set commands in instream inputs
I wrote this program as a need to use the set variables over all of the job parts. In your attitude, why to use SET vars in the job at all? Read the thread from beginning and you'll see that it is a problem discussed here several times with no solution. And... It is offered as take it or leave it. You can leave it if you want. Regards, Itschak | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak Mugzach | Web: www.Securiteam.co.il | -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth E Tomiak Sent: Saturday, July 05, 2008 7:25 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: Edit macro to support jcl set commands in instream inputs You lost me. You were talking about CICS regions, then maint jobs, then IMS, then CRC. And yet still provided no clear example of what good it would be. Perhaps you have a tool and are trying to force it to be used somewhere? On Fri, 4 Jul 2008 14:37:23 +0200, Itschak Mugzach [EMAIL PROTECTED] wrote: Kenneth, This rexx is for the maint. Jobs. If you run the same job for every region, for example if you have several IMS regions each of which has a different naming convention, CRC etc., but all the rest is the same, why to handle several copies? | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak Mugzach | Web: www.Securiteam.co.il | -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth E Tomiak Sent: Friday, July 04, 2008 3:45 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: Edit macro to support jcl set commands in instream inputs Can you give an example of why running rexx code on tens of CICS regions every time they start up day after day to change a variable in SYSIN which is stored in a permanent dataset is productive? After all, I know have to go add SET statements to started task JCL for variables that are only in SYSIN, maybe. On Tue, 1 Jul 2008 17:44:53 +0200, Itschak Mugzach [EMAIL PROTECTED] wrote: Dave, This is not an application. The is standart JCL stored in your librabry. Suppose that you have some tens of CICS environments. All have the same charcturistics execpt some prefix. JCL SET command will take care of the JCL variables, but what about the sysin data? This rexx exec take care of the sysin data only and let MVS take care of the JCL side, but both areusing the same set of values visa JCL SET commands. Regards, | Itschak Mugzach | Director | SecuriTeam Software | -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html __ NOD32 3240 (20080704) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html __ NOD32 3244 (20080705) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Edit macro to support jcl set commands in instream inputs
Kenneth, This rexx is for the maint. Jobs. If you run the same job for every region, for example if you have several IMS regions each of which has a different naming convention, CRC etc., but all the rest is the same, why to handle several copies? | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak Mugzach | Web: www.Securiteam.co.il | -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth E Tomiak Sent: Friday, July 04, 2008 3:45 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: Edit macro to support jcl set commands in instream inputs Can you give an example of why running rexx code on tens of CICS regions every time they start up day after day to change a variable in SYSIN which is stored in a permanent dataset is productive? After all, I know have to go add SET statements to started task JCL for variables that are only in SYSIN, maybe. On Tue, 1 Jul 2008 17:44:53 +0200, Itschak Mugzach [EMAIL PROTECTED] wrote: Dave, This is not an application. The is standart JCL stored in your librabry. Suppose that you have some tens of CICS environments. All have the same charcturistics execpt some prefix. JCL SET command will take care of the JCL variables, but what about the sysin data? This rexx exec take care of the sysin data only and let MVS take care of the JCL side, but both areusing the same set of values visa JCL SET commands. Regards, | Itschak Mugzach | Director | SecuriTeam Software | -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html __ NOD32 3240 (20080704) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Edit macro to support jcl set commands in instream inputs
You lost me. You were talking about CICS regions, then maint jobs, then IMS, then CRC. And yet still provided no clear example of what good it would be. Perhaps you have a tool and are trying to force it to be used somewhere? On Fri, 4 Jul 2008 14:37:23 +0200, Itschak Mugzach [EMAIL PROTECTED] wrote: Kenneth, This rexx is for the maint. Jobs. If you run the same job for every region, for example if you have several IMS regions each of which has a different naming convention, CRC etc., but all the rest is the same, why to handle several copies? | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak Mugzach | Web: www.Securiteam.co.il | -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth E Tomiak Sent: Friday, July 04, 2008 3:45 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: Edit macro to support jcl set commands in instream inputs Can you give an example of why running rexx code on tens of CICS regions every time they start up day after day to change a variable in SYSIN which is stored in a permanent dataset is productive? After all, I know have to go add SET statements to started task JCL for variables that are only in SYSIN, maybe. On Tue, 1 Jul 2008 17:44:53 +0200, Itschak Mugzach [EMAIL PROTECTED] wrote: Dave, This is not an application. The is standart JCL stored in your librabry. Suppose that you have some tens of CICS environments. All have the same charcturistics execpt some prefix. JCL SET command will take care of the JCL variables, but what about the sysin data? This rexx exec take care of the sysin data only and let MVS take care of the JCL side, but both areusing the same set of values visa JCL SET commands. Regards, | Itschak Mugzach | Director | SecuriTeam Software | -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html __ NOD32 3240 (20080704) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Edit macro to support jcl set commands in instream inputs
Can you give an example of why running rexx code on tens of CICS regions every time they start up day after day to change a variable in SYSIN which is stored in a permanent dataset is productive? After all, I know have to go add SET statements to started task JCL for variables that are only in SYSIN, maybe. On Tue, 1 Jul 2008 17:44:53 +0200, Itschak Mugzach [EMAIL PROTECTED] wrote: Dave, This is not an application. The is standart JCL stored in your librabry. Suppose that you have some tens of CICS environments. All have the same charcturistics execpt some prefix. JCL SET command will take care of the JCL variables, but what about the sysin data? This rexx exec take care of the sysin data only and let MVS take care of the JCL side, but both areusing the same set of values visa JCL SET commands. Regards, | Itschak Mugzach | Director | SecuriTeam Software | -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Edit macro to support jcl set commands in instream inputs
Dear all, As promised, below please find the rexx program. It was not fully tested, and need some enhancements ((like support for instream set commands that is easy to implement and will come soon). The atatched will help you use variables in the a jcl like this: //jobcard etc. //var1 jcllib order=my.pds //include unclude member=setup //step1exec pgm=idcams //sysprint dd sysout=* //sysindd * listcat ent(hlq.data) all delete hlq..data Listcat ent(hlq..data) all /* Will be happpy to get feedbacks. Enjoy it. | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak Mugzach | Web: www.Securiteam.co.il | /* MugiRexx */ Signal set.Var Trace On Set.Doc: -- JCL SET Support for SYSIN Function: This program runs as an EDIT MACRO replacing the original SUB macro. It will substitute Variables in an DD * type datasets (Instream sysin) based on the JCL SET commands. Below are the main functions of the program: checkpoint with save, change profile to nosave rec on. Find and read the INCLUDE member pointed by JCCLIB. Create a command table that holds the vars values. Ignores none sysin variables (Let interpeter dos it). Mark the DD * data with labels. Do the actual change. Submit the job Discard changes. NextRel.: Support for Instream SET command Ignore IEBUPDTE inputs Location: Your Clist (sysproc) concatanation. Contact: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] (c) SecuriTeam Software Ltd. 1999-2008 -- Set.Var: Cindx= 1 Csetup.0 = 1 Csetup.1.Var = '..' Csetup.1.Val = '.' Lindx= 0 LabelStr = abcdefghijklmnopqrstuvwxyz SIFlag = -1 Set.MsgDir: SA0001E = SA0001E no JCLLIB Definition found in SA0002E = SA0002E no INCLUDE Definition found in SA0003I = SA0003I variable name value: Set.Main: Address ISPEXEC isredit macro ISREDIT Recovery On /* Enable UNDO */ ISREDIT Nosave /* Enable UNDO */ ISREDIT (qfdsn) = DATASET /* get library name */ ISREDIT (qmemb) = MEMBER/* get Member name */ If (Qmemb 'QMEMB') Then Do/* meber of pds?*/ Qfdsn = qfdsn||'('||Qmemb||')' /* create full dsn */ end ISREDIT FIND 'JCLLIB' first/* locate in jcl*/ If (Rc 0) Then do /* not found? */ say SA0001E qfdsn exit /* tell exit */ end /* of not found */ ISREDIT (TextLine) = LINE .ZCSR
Re: Edit macro to support jcl set commands in instream inputs
I must have missed the original thread, but wouldn't it be easier to do this with an ISPF skeleton? Dave Salt See the new SimpList(tm) rollover image at: http://www.mackinney.com/products/SIM/simplist.htm Date: Tue, 1 Jul 2008 17:05:05 +0200 From: [EMAIL PROTECTED] Subject: Edit macro to support jcl set commands in instream inputs To: IBM-MAIN@BAMA.UA.EDU Dear all, As promised, below please find the rexx program. It was not fully tested, and need some enhancements ((like support for instream set commands that is easy to implement and will come soon). The atatched will help you use variables in the a jcl like this: //jobcard etc. //var1 jcllib order=my.pds //include unclude member=setup //step1 exec pgm=idcams //sysprint dd sysout=* //sysin dd * listcat ent(hlq.data) all delete hlq..data Listcat ent(hlq..data) all /* Will be happpy to get feedbacks. Enjoy it. | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak Mugzach | Web: www.Securiteam.co.il | /* MugiRexx */ Signal set.Var Trace On Set.Doc: -- JCL SET Support for SYSIN Function: This program runs as an EDIT MACRO replacing the original SUB macro. It will substitute Variables in an DD * type datasets (Instream sysin) based on the JCL SET commands. Below are the main functions of the program: checkpoint with save, change profile to nosave rec on. Find and read the INCLUDE member pointed by JCCLIB. Create a command table that holds the vars values. Ignores none sysin variables (Let interpeter dos it). Mark the DD * data with labels. Do the actual change. Submit the job Discard changes. NextRel.: Support for Instream SET command Ignore IEBUPDTE inputs Location: Your Clist (sysproc) concatanation. Contact: [EMAIL PROTECTED] (c) SecuriTeam Software Ltd. 1999-2008 -- Set.Var: Cindx = 1 Csetup.0 = 1 Csetup.1.Var = '..' Csetup.1.Val = '.' Lindx = 0 LabelStr = abcdefghijklmnopqrstuvwxyz SIFlag = -1 Set.MsgDir: SA0001E = SA0001E no JCLLIB Definition found in SA0002E = SA0002E no INCLUDE Definition found in SA0003I = SA0003I variable name value: Set.Main: Address ISPEXEC isredit macro ISREDIT Recovery On /* Enable UNDO */ ISREDIT Nosave /* Enable UNDO */ ISREDIT (qfdsn) = DATASET /* get library name */ ISREDIT (qmemb) = MEMBER /* get Member name */ If (Qmemb 'QMEMB') Then Do /* meber of pds? */ Qfdsn = qfdsn||'('||Qmemb||')' /* create full dsn */ end ISREDIT FIND 'JCLLIB' first /* locate in jcl */ If (Rc 0) Then do /* not found? */ say SA0001E qfdsn exit /* tell exit */ end /* of not found */ ISREDIT (TextLine) = LINE .ZCSR /* Get Line number */ Qvardsn = Substr(TextLine,Pos('ORDER=',TextLine)+6) ISREDIT FIND 'INCLUDE' first /* locate in jcl */ If (Rc 0) Then do /* Not found? */ say SA0002E qfdsn exit /* Tell Exit */ end /* of RC0 */ ISREDIT (TextLine) = LINE .ZCSR /* Get text in line */ Qvardsn = Strip(Qvardsn)||'('||, /* Build dsn of set */ Strip(Substr(TextLine,Pos('MEMBER=',TextLine)+7))||')' ADDRESS TSO /* switch to tso */ Alloc f(QSETUP) da(||Qvardsn||) shr reuse EXECIO * DISKR QSETUP (FINIS STEM QSETUP. Qindx = 0 Do While (Qindx Qsetup.0) Qindx = Qindx + 1 TextLine = Qsetup.Qindx If (Substr(TextLine,1,3) = '//*') Then Do Iterate end TextLine = Translate(textline,' ','=') Cindx = Cindx + 1 Csetup.Cindx.Var = ''||Word(Textline,3) Csetup.Cindx.Val = Word(Textline,4) /* say 'var=' Csetup.Cindx.Var Say 'Val=' Csetup.Cindx.Val */ end Address ispexec /* switch back to member */ isredit (lastline) = LINENUM .zlast Qindx = 0 Do While (Qindx LastLine) Qindx = Qindx + 1 ISREDIT (TextLine) = LINE Qindx If (Substr(TextLine,1,1) = '/') Then do If (SIFlag 0) Then Do ISREDIT LABEL Qindx-1 = .E||, Substr(LabelStr,LIndx,1) say .E||, Substr(LabelStr,LIndx,1) Say 'end label at line' Qindx-1 SIFlag = -1 Iterate end SIFlag = 0 Iterate End If (SIFlag 1) Then Do LIndx = LIndx + 1 ISREDIT LABEL Qindx = .S||Substr(LabelStr,LIndx,1) Say 'start label at line' Qindx end SIFlag = SIFlag + 1 End exit Cindx = 0 Tindx = 0 ChngCnt = 0 Do while (Cindx Csetup) Cindx = Cindx + 1 CmdVar = Csetup.Cindx.Var CmdVal = Csetup.Cindx.Var Do while (Tindx LIndx) Tindx = Tindx + 1 SLabel = .S||Substr(LabStr,Tindx,1) ELabel = .E||Substr(LabStr,Tindx,1) isredit change CmdVar CmdVal ALL Slabel Elabel If (Rc = 0) then do ChngCnt = ChngCnt + 1 End End End /* undo changes CIndx = 0 Do While (Cindx ChngCnt) Cindx = Cindx + 1 ISREDIT UNDO End */ Say That All folks -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm
Re: Edit macro to support jcl set commands in instream inputs
Dave, This is not an application. The is standart JCL stored in your librabry. Suppose that you have some tens of CICS environments. All have the same charcturistics execpt some prefix. JCL SET command will take care of the JCL variables, but what about the sysin data? This rexx exec take care of the sysin data only and let MVS take care of the JCL side, but both areusing the same set of values visa JCL SET commands. Regards, | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: Itschak Mugzach | Web: www.Securiteam.co.il | -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Dave Salt Sent: Tuesday, July 01, 2008 5:27 PM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: Edit macro to support jcl set commands in instream inputs I must have missed the original thread, but wouldn't it be easier to do this with an ISPF skeleton? Dave Salt See the new SimpList(tm) rollover image at: http://www.mackinney.com/products/SIM/simplist.htm Date: Tue, 1 Jul 2008 17:05:05 +0200 From: [EMAIL PROTECTED] Subject: Edit macro to support jcl set commands in instream inputs To: IBM-MAIN@BAMA.UA.EDU Dear all, As promised, below please find the rexx program. It was not fully tested, and need some enhancements ((like support for instream set commands that is easy to implement and will come soon). The atatched will help you use variables in the a jcl like this: //jobcard etc. //var1 jcllib order=my.pds //include unclude member=setup //step1 exec pgm=idcams //sysprint dd sysout=* //sysin dd * listcat ent(hlq.data) all delete hlq..data Listcat ent(hlq..data) all /* Will be happpy to get feedbacks. Enjoy it. | Itschak Mugzach | Director | SecuriTeam Software | | Email: [EMAIL PROTECTED] | Mob: +972 522 986404 | Skype: | Itschak Mugzach | Web: www.Securiteam.co.il | /* MugiRexx */ Signal set.Var Trace On Set.Doc: -- JCL SET Support for SYSIN Function: This program runs as an EDIT MACRO replacing the original SUB macro. It will substitute Variables in an DD * type datasets (Instream sysin) based on the JCL SET commands. Below are the main functions of the program: checkpoint with save, change profile to nosave rec on. Find and read the INCLUDE member pointed by JCCLIB. Create a command table that holds the vars values. Ignores none sysin variables (Let interpeter dos it). Mark the DD * data with labels. Do the actual change. Submit the job Discard changes. NextRel.: Support for Instream SET command Ignore IEBUPDTE inputs Location: Your Clist (sysproc) concatanation. Contact: [EMAIL PROTECTED] (c) SecuriTeam Software Ltd. 1999-2008 -- Set.Var: Cindx = 1 Csetup.0 = 1 Csetup.1.Var = '..' Csetup.1.Val = '.' Lindx = 0 LabelStr = abcdefghijklmnopqrstuvwxyz SIFlag = -1 Set.MsgDir: SA0001E = SA0001E no JCLLIB Definition found in SA0002E = SA0002E no INCLUDE Definition found in SA0003I = SA0003I variable name value: Set.Main: Address ISPEXEC isredit macro ISREDIT Recovery On /* Enable UNDO */ ISREDIT Nosave /* Enable UNDO */ ISREDIT (qfdsn) = DATASET /* get library name */ ISREDIT (qmemb) = MEMBER /* get Member name */ If (Qmemb 'QMEMB') Then Do /* meber of pds? */ Qfdsn = qfdsn||'('||Qmemb||')' /* create full dsn */ end ISREDIT FIND 'JCLLIB' first /* locate in jcl */ If (Rc 0) Then do /* not found? */ say SA0001E qfdsn exit /* tell exit */ end /* of not found */ ISREDIT (TextLine) = LINE .ZCSR /* Get Line number */ Qvardsn = Substr(TextLine,Pos('ORDER=',TextLine)+6) ISREDIT FIND 'INCLUDE' first /* locate in jcl */ If (Rc 0) Then do /* Not found? */ say SA0002E qfdsn exit /* Tell Exit */ end /* of RC0 */ ISREDIT (TextLine) = LINE .ZCSR /* Get text in line */ Qvardsn = Strip(Qvardsn)||'('||, /* Build dsn of set */ Strip(Substr(TextLine,Pos('MEMBER=',TextLine)+7))||')' ADDRESS TSO /* switch to tso */ Alloc f(QSETUP) da(||Qvardsn||) shr reuse EXECIO * DISKR QSETUP (FINIS STEM QSETUP. Qindx = 0 Do While (Qindx Qsetup.0) Qindx = Qindx + 1 TextLine = Qsetup.Qindx If (Substr(TextLine,1,3) = '//*') Then Do Iterate end TextLine = Translate(textline,' ','=') Cindx = Cindx + 1 Csetup.Cindx.Var = ''||Word(Textline,3) Csetup.Cindx.Val = Word(Textline,4) /* say 'var=' Csetup.Cindx.Var Say 'Val=' Csetup.Cindx.Val */ end Address ispexec /* switch back to member */ isredit (lastline) = LINENUM .zlast Qindx = 0 Do While (Qindx LastLine) Qindx = Qindx + 1 ISREDIT (TextLine) = LINE Qindx If (Substr(TextLine,1,1) = '/') Then do If (SIFlag 0) Then Do ISREDIT LABEL Qindx-1 = .E||, Substr(LabelStr,LIndx,1) say .E||, Substr(LabelStr,LIndx,1) Say 'end label at line' Qindx-1 SIFlag = -1 Iterate end SIFlag = 0 Iterate End If (SIFlag 1) Then Do LIndx = LIndx + 1 ISREDIT LABEL