Re: Symbolic parameters inside SYSIN
Henrique, The below PROC is a sample of what you'd like to accomplish as it deletes a passed VSAM ds-name. The method is useful when SYSIN has only several VARIABLE cards. Also the PROC is easily convertable to plain JCL with the SET symbols: //DELVSAM PROC VDSN='?' - VSAM DSN //*/ /* (1) GENERATE TEMP INSTRUCTION WITH THE DSN: //*/ /GENTEMP EXEC PGM=ASMA90,X // PARM=('SYSPARM( VDSN -)') //SYSINDD DSN=your.source.pds(PARMTODD),DISP=SHR //SYSUT1 DD SPACE=(4096,(2,2)),UNIT=VIO //SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR //SYSPRINT DD DUMMY //SYSLIN DD UNIT=VIO,DISP=(,PASS),SPACE=(TRK,1,1)), // DSN=amp;WORK, // DCB=(BLKSIZE=80,LRECL=80,RECFM=FB) //*/ /* (2) RUN IDCAMS TO DELETE CLUSTER //*/ /DELDEFIN EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=skeleton(DELDEF1) - DELETE ( - // DD DISP=(SHR,PASS),DSN=amp;WORK- VDSN // DD DISP=SHR,DSN=skeleton(DELDEF2) - ) PURGE SCRATCH //PEND where member PARMTODD is the following 2-line program placed in your source library PUNCH 'SYSPARM' END Hope this helps, -Victor- On Mon, 6 Jul 2009 13:05:52 -0500, Henrique Seganfredo henri...@seganfredo.com wrote: Hello, I am trying to optimize some tasks I perform with my MQ Series. My idea is to delete a bunch of MQ objects just passing am unique number reference that identifies our partners. The JCL would look like this: //DLPARTNR PROC REF= //CSQUTIL1 EXEC PGM=CSQUTIL,REGION=0M, //PARM='BCMH' //STEPLIB DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQANLE // DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQAUTH //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=SSTP.SYSIN(DEL1) //CSQUCMD DD DISP=SHR,DSN=SSTP.SYSIN(DEL2) So I have several MQ-delete commands contained inside of the DEL1 and DEL2 SYSIN datasets, somewhat like this: DELETE CHANNEL(MYCOMPANY.TO.REF) I ended up discovering that symbols parameters I submit do not replace the ones contained on SYSIN data, is this true? Is there any workaround? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Symbolic parameters inside SYSIN
All of you Unix-haters, please look away :-) It turns out that the Unix shell has nice variable substitution capabilities, and with our free Co:Z Batch utility (think BPXBATCH without the warts), you can run it to tailor data with variable substitution. Here's Victor's example reworked to do this: //*/ /* (1) Run an inline shell to tailor input using env vars //*/ //DELVSAM PROC VDSN='?' - VSAM DSN //S1 EXEC PGM=COZBATCH,PARM='/VDSN=VDSN' //STDIN DD * Input to the Unix shell cat EOF DELETE ( $VDSN ) PURGE SCRATCH EOF //STDOUT DD UNIT=VIO,DISP=(,PASS), // SPACE=(TRK,1,1)), // DSN=WORK, // DCB=(BLKSIZE=80,LRECL=80,RECFM=FB) //*/ /* (2) RUN IDCAMS TO DELETE CLUSTER //*/ /DELDEFIN EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=WORK //PEND Another feature of COZBATCH is its ability to deal with the 100 character PARM limit by stringing multiple steps together that set environment variables. See example #6 here: http://dovetail.com/docs/cozbatch/examples.html OK - Pardon me if I sound like the Sham-Wow guy, but what if you wanted to delete all the clusters that matched a certain catalog search pattern (IGGCSI00)? The following combines COZBATCH with our catsearch shell command (also included the free Co:Z Toolkit) and the Unix awk command: //*/ /* (1) Run an inline shell to generate IDCAMS stmnts //*/ //DELVSAM PROC PAT='HLQ.TEST.**.KSDS' //S1 EXEC PGM=COZBATCH,PARM='/PAT=PAT' //STDIN DD * Input to the Unix shell catsearch $PAT | awk '{ print DELETE ( $1 ) PURGE SCRATCH }' //STDOUT DD UNIT=VIO,DISP=(,PASS), // SPACE=(TRK,1,1)), // DSN=WORK, // DCB=(BLKSIZE=80,LRECL=80,RECFM=FB) //*/ /* (2) RUN IDCAMS TO DELETE CLUSTERS //*/ /DELDEFIN EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=WORK //PEND Kirk Wolf Dovetailed Technologies http://dovetail.com On Tue, Jul 7, 2009 at 12:53 PM, Victor Gil victor@broadridge.comwrote: Henrique, The below PROC is a sample of what you'd like to accomplish as it deletes a passed VSAM ds-name. The method is useful when SYSIN has only several VARIABLE cards. Also the PROC is easily convertable to plain JCL with the SET symbols: //DELVSAM PROC VDSN='?' - VSAM DSN //*/ /* (1) GENERATE TEMP INSTRUCTION WITH THE DSN: //*/ /GENTEMP EXEC PGM=ASMA90,X // PARM=('SYSPARM( VDSN -)') //SYSINDD DSN=your.source.pds(PARMTODD),DISP=SHR //SYSUT1 DD SPACE=(4096,(2,2)),UNIT=VIO //SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR //SYSPRINT DD DUMMY //SYSLIN DD UNIT=VIO,DISP=(,PASS),SPACE=(TRK,1,1)), // DSN=amp;WORK, // DCB=(BLKSIZE=80,LRECL=80,RECFM=FB) //*/ /* (2) RUN IDCAMS TO DELETE CLUSTER //*/ /DELDEFIN EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=skeleton(DELDEF1) - DELETE ( - // DD DISP=(SHR,PASS),DSN=amp;WORK- VDSN // DD DISP=SHR,DSN=skeleton(DELDEF2) - ) PURGE SCRATCH //PEND where member PARMTODD is the following 2-line program placed in your source library PUNCH 'SYSPARM' END Hope this helps, -Victor- -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Symbolic parameters inside SYSIN
Hello, I am trying to optimize some tasks I perform with my MQ Series. My idea is to delete a bunch of MQ objects just passing am unique number reference that identifies our partners. The JCL would look like this: //DLPARTNR PROC REF= //CSQUTIL1 EXEC PGM=CSQUTIL,REGION=0M, //PARM='BCMH' //STEPLIB DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQANLE // DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQAUTH //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=SSTP.SYSIN(DEL1) //CSQUCMD DD DISP=SHR,DSN=SSTP.SYSIN(DEL2) So I have several MQ-delete commands contained inside of the DEL1 and DEL2 SYSIN datasets, somewhat like this: DELETE CHANNEL(MYCOMPANY.TO.REF) I ended up discovering that symbols parameters I submit do not replace the ones contained on SYSIN data, is this true? Is there any workaround? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Symbolic parameters inside SYSIN
I ended up discovering that symbols parameters I submit do not replace the ones contained on SYSIN data, is this true? Yes. Is there any workaround? Write a REXX EXEC, that will take the DSN as a parm. Invoke it with Batch/TSO, to create your delete statement, eg: //TSOREXX EXEC PGM=IKJEFT01,DYNAMNBR=500, //PARM='%rexx dsn.',...otherparms //... other ddnames //... etc - Too busy driving to stop for gas! -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Symbolic parameters inside SYSIN
The best option is to create an ISPF Skel process or REXX or Clist to do the substitution, create the batch job and Control Cards, and then submit the job. There is nothing currently in TSO or JCL that will do the kind of process you need that I know of. Lizette Hello, I am trying to optimize some tasks I perform with my MQ Series. My idea is to delete a bunch of MQ objects just passing am unique number reference that identifies our partners. The JCL would look like this: //DLPARTNR PROC REF= //CSQUTIL1 EXEC PGM=CSQUTIL,REGION=0M, //PARM='BCMH' //STEPLIB DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQANLE // DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQAUTH //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=SSTP.SYSIN(DEL1) //CSQUCMD DD DISP=SHR,DSN=SSTP.SYSIN(DEL2) So I have several MQ-delete commands contained inside of the DEL1 and DEL2 SYSIN datasets, somewhat like this: DELETE CHANNEL(MYCOMPANY.TO.REF) I ended up discovering that symbols parameters I submit do not replace the ones contained on SYSIN data, is this true? Is there any workaround? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Symbolic parameters inside SYSIN
---snip--- Hello, I am trying to optimize some tasks I perform with my MQ Series. My idea is to delete a bunch of MQ objects just passing am unique number reference that identifies our partners. The JCL would look like this: //DLPARTNR PROC REF= //CSQUTIL1 EXEC PGM=CSQUTIL,REGION=0M, //PARM='BCMH' //STEPLIB DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQANLE // DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQAUTH //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=SSTP.SYSIN(DEL1) //CSQUCMD DD DISP=SHR,DSN=SSTP.SYSIN(DEL2) So I have several MQ-delete commands contained inside of the DEL1 and DEL2 SYSIN datasets, somewhat like this: DELETE CHANNEL(MYCOMPANY.TO.REF) I ended up discovering that symbols parameters I submit do not replace the ones contained on SYSIN data, is this true? Is there any workaround? unsnip-- I have a Assembler program that can help with that. Send me a private E-Mail address and I'll send you a copy. It will make substitutions in SYSIN-type control statements, based on parameters provided through JCL, and has some special values as well. You'll need a program to Un-ZIP the file I send you, unless you tell me otherwise. Rick -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Symbolic parameters inside SYSIN
Add the ref to the del1 and del2 member name. This would accomplish what you desire. Regards Otto Schumacher Technical Support, CICS EDS, an HP Company Ahold Account 2000 Wade Hampton Blvd. LC1-302 Greenville, South Carolina, 29615 Tel: 864 987-1417 Fax: 864 987-4500 E-mail: otto.schumac...@eds.com We deliver on our commitments so you can deliver on yours. -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Rick Fochtman Sent: Monday, July 06, 2009 3:29 PM To: IBM-MAIN@bama.ua.edu Subject: Re: Symbolic parameters inside SYSIN ---snip--- Hello, I am trying to optimize some tasks I perform with my MQ Series. My idea is to delete a bunch of MQ objects just passing am unique number reference that identifies our partners. The JCL would look like this: //DLPARTNR PROC REF= //CSQUTIL1 EXEC PGM=CSQUTIL,REGION=0M, //PARM='BCMH' //STEPLIB DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQANLE // DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQAUTH //SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=SSTP.SYSIN(DEL1) //CSQUCMD DD DISP=SHR,DSN=SSTP.SYSIN(DEL2) So I have several MQ-delete commands contained inside of the DEL1 and DEL2 SYSIN datasets, somewhat like this: DELETE CHANNEL(MYCOMPANY.TO.REF) I ended up discovering that symbols parameters I submit do not replace the ones contained on SYSIN data, is this true? Is there any workaround? unsnip -- I have a Assembler program that can help with that. Send me a private E-Mail address and I'll send you a copy. It will make substitutions in SYSIN-type control statements, based on parameters provided through JCL, and has some special values as well. You'll need a program to Un-ZIP the file I send you, unless you tell me otherwise. Rick -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Symbolic parameters inside SYSIN
I have a COBOL program that I wrote some time ago that will build SYSIN cards based on PARM input, where you can have multiple variables. The program can generate multiple lines of SYSIN from a single PARM, and can adapt to Upper or Lower case changes mid-parm. Here is more about what it does This program will take a string passed as a parm to the Program, and generate a dataset from that parm. This is done to allow parms to be passed as symbolics into a proc, which are generated into control statements. Since parm processing is limited to 100 chars, only 100 characters of commands can be processed. When a delimiter '~!' is encountered, the existing area Is written out and the start of a new command is assumed. When '~@' is encountered, the record is written out, but any spaces until the next character are eliminated. This will allow for spacing adjustments in the parm symbolics. When '~Q' is found, a single quote is substituted. When '~L' is found, the following text will be converted to Lowercase until the end of the command (~! or ~@) or until an uppercase command (~U) is encountered. When '~U' is found, the conversion to lower case is ended. If you are interested in this sort of solution, let me know. Don 2009/7/6 Rick Fochtman rfocht...@ync.net ---snip--- Hello, I am trying to optimize some tasks I perform with my MQ Series. My idea is to delete a bunch of MQ objects just passing am unique number reference that identifies our partners. The JCL would look like this: //DLPARTNR PROC REF= //CSQUTIL1 EXEC PGM=CSQUTIL,REGION=0M, // PARM='BCMH' //STEPLIB DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQANLE// DD DISP=SHR,DSN=SSTP.HZ19.MQS600.SCSQAUTH//SYSPRINT DD SYSOUT=* //SYSINDD DISP=SHR,DSN=SSTP.SYSIN(DEL1) //CSQUCMD DD DISP=SHR,DSN=SSTP.SYSIN(DEL2) So I have several MQ-delete commands contained inside of the DEL1 and DEL2 SYSIN datasets, somewhat like this: DELETE CHANNEL(MYCOMPANY.TO.REF) I ended up discovering that symbols parameters I submit do not replace the ones contained on SYSIN data, is this true? Is there any workaround? unsnip-- I have a Assembler program that can help with that. Send me a private E-Mail address and I'll send you a copy. It will make substitutions in SYSIN-type control statements, based on parameters provided through JCL, and has some special values as well. You'll need a program to Un-ZIP the file I send you, unless you tell me otherwise. Rick -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html