Re: Rexx substr not retiring string
That was it thanks Sent from my iPhone On Apr 1, 2014, at 7:26 AM, Andrew Armstrong androidarmstr...@gmail.com wrote: Missing a . after the stem name. Try: execio * DISKW outds (finis stem outvar. -- 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: Rexx substr not retiring string
On Tue, 1 Apr 2014 14:40:40 -0400, Micheal Butz michealb...@optonline.net wrote: That was it thanks Sent from my iPhone On Apr 1, 2014, at 7:26 AM, Andrew Armstrong androidarmstr...@gmail.com wrote: Missing a . after the stem name. Try: execio * DISKW outds (finis stem outvar. Just a word of caution, you should never use * for the number of records to write with DISKW when using the STEM option. By REXX definition/usage a stem of the form stemname. should have a count of the entries in the stem in variable stemname.0. So in your example, outvar.0 should contain the number of entries in the outvar. stem. If you are creating outvar. yourself, then you must keep count of the number of entries you are creating and set outvar.0 to that number when you are done. Your EXECIO command should then look like this: 'EXECIO' outvar.0 'DISKW OUTDS (FINIS STEM OUTVAR.' So why not use *? It will work most of the time and some of you are probably using it now with no problems. From the TSO REXX Reference on EXECIO: STEM var-name the stem of the list of variables from which information is to be written. To write information from compound variables, which allow for indexing, the var-name should end with a period, MYVAR., for example. When three lines are written to the data set, they are taken from MYVAR.1, MYVAR.2, MYVAR.3. When * is specified as the number of lines to write, the EXECIO command stops writing information to the data set when it finds a null line or an uninitialized compound variable. In this case, if the list contained 10 compound variables, the EXECIO command stops at MYVAR.11. The 0th variable has no effect on controlling the number of lines written from variables. . . . . Let's say you have a REXX program that reads several different files/members and writes those files/members to different outputs. You read the file/member into a stem using DISKR and write the same stem out using DISKW and *. 'EXECIO * DISKR FILEIN (FINIS STEM REC.' /* Lets say 20 records were read, rec.0 = 20 */ 'EXECIO * DISKW FILEOUT (FINIS STEM REC.' /* Writes 20 records out because rec.21 is unassigned rec.21 = 'REC.21' */ (allocate new files to FILEIN and FILEOUT) 'EXECIO * DISKR FILEIN (FINIS STEM REC.' /* Lets say 10 records were read, rec.0 = 10 */ 'EXECIO * DISKW FILEOUT (FINIS STEM REC.' /* Writes 20 records out! rec.1-rec.10 from current file, rec.11-rec.20 from previous file! */ 'EXECIO' rec.0 'DISKW FILEOUT (FINIS STEM REC.' /* Writes 10 records out */ Of course, you could do a REXX Drop rec. command between the reads and that would allow * to work, but why bother? -- Dale R. Smith -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Rexx substr not retiring string
On Tue, 1 Apr 2014 15:24:50 -0500, Dale R. Smith wrote: execio * DISKW outds (finis stem outvar. Just a word of caution, you should never use * for the number of records to write with DISKW when using the STEM option. By REXX definition/usage a stem of the form stemname. should have a count of the entries in the stem in variable stemname.0. So in your example, outvar.0 should contain the number of entries in the outvar. stem. If you are creating outvar. yourself, then you must keep count of the number of entries you are creating and set outvar.0 to that number when you are done. Your EXECIO command should then look like this: 'EXECIO' outvar.0 'DISKW OUTDS (FINIS STEM OUTVAR.' So why not use *? It will work most of the time and some of you are probably using it now with no problems. From the TSO REXX Reference on EXECIO: ... When * is specified as the number of lines to write, the EXECIO command stops writing information to the data set when it finds a null line ... Dammit! That is CMS/EXEC2 crap that should never have been permitted in MVS because: o EXECIO was created to support EXEC2, and EXEC2 does not distinguish between uninitialized variables and null lines. Rexx can tell the difference; EXEC2 never intruded into TSO, and I don't believe CLIST supports EXECIO. o The traditional CMS filesystems (MDFS and SFS) do not permit empty records; MVS does, so empty records should not operate as terminators. (Don't know about BFS.) ...or an uninitialized compound variable. In this case, if the list contained 10 compound variables, the EXECIO command stops at MYVAR.11. (unless an earlier compound variable was initialized but had a null value.) An uninitialized variable should be the only recognized terminator. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Rexx substr not retiring string
Without seeing your code I'll guess you don't have your single and double quotes correct. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Micheal Butz Sent: Tuesday, April 01, 2014 2:31 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Rexx substr not retiring string I just did that I assigned the final value to outvar.0 And get a error message positional paramter not valid Sent from my iPhone On Apr 1, 2014, at 4:24 PM, Dale R. Smith dale-sm...@columbus.rr.com wrote: On Tue, 1 Apr 2014 14:40:40 -0400, Micheal Butz michealb...@optonline.net wrote: That was it thanks Sent from my iPhone On Apr 1, 2014, at 7:26 AM, Andrew Armstrong androidarmstr...@gmail.com wrote: Missing a . after the stem name. Try: execio * DISKW outds (finis stem outvar. Just a word of caution, you should never use * for the number of records to write with DISKW when using the STEM option. By REXX definition/usage a stem of the form stemname. should have a count of the entries in the stem in variable stemname.0. So in your example, outvar.0 should contain the number of entries in the outvar. stem. If you are creating outvar. yourself, then you must keep count of the number of entries you are creating and set outvar.0 to that number when you are done. Your EXECIO command should then look like this: 'EXECIO' outvar.0 'DISKW OUTDS (FINIS STEM OUTVAR.' So why not use *? It will work most of the time and some of you are probably using it now with no problems. From the TSO REXX Reference on EXECIO: STEM var-name the stem of the list of variables from which information is to be written. To write information from compound variables, which allow for indexing, the var-name should end with a period, MYVAR., for example. When three lines are written to the data set, they are taken from MYVAR.1, MYVAR.2, MYVAR.3. When * is specified as the number of lines to write, the EXECIO command stops writing information to the data set when it finds a null line or an uninitialized compound variable. In this case, if the list contained 10 compound variables, the EXECIO command stops at MYVAR.11. The 0th variable has no effect on controlling the number of lines written from variables. . . . . Let's say you have a REXX program that reads several different files/members and writes those files/members to different outputs. You read the file/member into a stem using DISKR and write the same stem out using DISKW and *. 'EXECIO * DISKR FILEIN (FINIS STEM REC.' /* Lets say 20 records were read, rec.0 = 20 */ 'EXECIO * DISKW FILEOUT (FINIS STEM REC.' /* Writes 20 records out because rec.21 is unassigned rec.21 = 'REC.21' */ (allocate new files to FILEIN and FILEOUT) 'EXECIO * DISKR FILEIN (FINIS STEM REC.' /* Lets say 10 records were read, rec.0 = 10 */ 'EXECIO * DISKW FILEOUT (FINIS STEM REC.' /* Writes 20 records out! rec.1-rec.10 from current file, rec.11-rec.20 from previous file! */ 'EXECIO' rec.0 'DISKW FILEOUT (FINIS STEM REC.' /* Writes 10 records out */ Of course, you could do a REXX Drop rec. command between the reads and that would allow * to work, but why bother? -- Dale R. Smith -- 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 __ CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Rexx substr not retiring string
You were right Sent from my iPhone On Apr 1, 2014, at 5:35 PM, George, William@FTB bill.geo...@ftb.ca.gov wrote: Without seeing your code I'll guess you don't have your single and double quotes correct. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Micheal Butz Sent: Tuesday, April 01, 2014 2:31 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Rexx substr not retiring string I just did that I assigned the final value to outvar.0 And get a error message positional paramter not valid Sent from my iPhone On Apr 1, 2014, at 4:24 PM, Dale R. Smith dale-sm...@columbus.rr.com wrote: On Tue, 1 Apr 2014 14:40:40 -0400, Micheal Butz michealb...@optonline.net wrote: That was it thanks Sent from my iPhone On Apr 1, 2014, at 7:26 AM, Andrew Armstrong androidarmstr...@gmail.com wrote: Missing a . after the stem name. Try: execio * DISKW outds (finis stem outvar. Just a word of caution, you should never use * for the number of records to write with DISKW when using the STEM option. By REXX definition/usage a stem of the form stemname. should have a count of the entries in the stem in variable stemname.0. So in your example, outvar.0 should contain the number of entries in the outvar. stem. If you are creating outvar. yourself, then you must keep count of the number of entries you are creating and set outvar.0 to that number when you are done. Your EXECIO command should then look like this: 'EXECIO' outvar.0 'DISKW OUTDS (FINIS STEM OUTVAR.' So why not use *? It will work most of the time and some of you are probably using it now with no problems. From the TSO REXX Reference on EXECIO: STEM var-name the stem of the list of variables from which information is to be written. To write information from compound variables, which allow for indexing, the var-name should end with a period, MYVAR., for example. When three lines are written to the data set, they are taken from MYVAR.1, MYVAR.2, MYVAR.3. When * is specified as the number of lines to write, the EXECIO command stops writing information to the data set when it finds a null line or an uninitialized compound variable. In this case, if the list contained 10 compound variables, the EXECIO command stops at MYVAR.11. The 0th variable has no effect on controlling the number of lines written from variables. . . . . Let's say you have a REXX program that reads several different files/members and writes those files/members to different outputs. You read the file/member into a stem using DISKR and write the same stem out using DISKW and *. 'EXECIO * DISKR FILEIN (FINIS STEM REC.' /* Lets say 20 records were read, rec.0 = 20 */ 'EXECIO * DISKW FILEOUT (FINIS STEM REC.' /* Writes 20 records out because rec.21 is unassigned rec.21 = 'REC.21' */ (allocate new files to FILEIN and FILEOUT) 'EXECIO * DISKR FILEIN (FINIS STEM REC.' /* Lets say 10 records were read, rec.0 = 10 */ 'EXECIO * DISKW FILEOUT (FINIS STEM REC.' /* Writes 20 records out! rec.1-rec.10 from current file, rec.11-rec.20 from previous file! */ 'EXECIO' rec.0 'DISKW FILEOUT (FINIS STEM REC.' /* Writes 10 records out */ Of course, you could do a REXX Drop rec. command between the reads and that would allow * to work, but why bother? -- Dale R. Smith -- 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 __ CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email. -- 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: Rexx substr not retiring string
On Tue, 1 Apr 2014 21:35:30 +, George, William@FTB wrote: Without seeing your code I'll guess you don't have your single and double quotes correct. You mean like this?: user@HOST: rexx address MVS 'execio foo.0 diskw fred (stem foo.' IRX0601E EXECIO lines positional parameter is not valid. Specify * or a number. The insight that comes only of painful experience. But, yah; seeing the code would help greatly. Also the verbatim message code and text. -Original Message- From: Micheal Butz Sent: Tuesday, April 01, 2014 2:31 PM I just did that I assigned the final value to outvar.0 And get a error message positional paramter not valid -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Fwd: Rexx substr not retiring string
I originally sent to wrong forum Sent from my iPhone Begin forwarded message: From: Micheal Butz michealb...@optonline.net Date: March 31, 2014 at 11:02:50 PM EDT To: Assembler Language assembler-l...@listserv.uga.edu Subject: Rexx substr not retiring string I have some imbedded JCL in a. sequitial file Problem is it starts at col 2 and I need it shift over to column 1 So I use a stem e.g outvar Do I = 1 to n. /* where n is the number of lines */ Outvar.I = substr(jcl.I,2,81) Afterwards I write out the results execio * DISKW outds (finis stem outvar Outds is the ddname of the dataset that should have the Jcl When I look at the dataset represented by outds It the variable name outvar0,outvar1 But not the data Thanks Sent from my iPhone -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Rexx substr not retiring string
On 2014-03-31, at 21:06, Micheal Butz wrote: I originally sent to wrong forum Well, TSO-REXX would have been the right one. From: Micheal Butz michealb...@optonline.net Date: March 31, 2014 at 11:02:50 PM EDT To: Assembler Language assembler-l...@listserv.uga.edu Subject: Rexx substr not retiring string You could have copied-and-pasted rather than forwarding. I have some imbedded JCL in a. sequitial file ... Outvar.I = substr(jcl.I,2,81) You probably want: Outvar.I = substr(jcl.I,2,80) Afterwards I write out the results execio * DISKW outds (finis stem outvar Aw, gee... execio * DISKW outds (finis stem outvar. (I suspect there are examples somewhere.) -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN