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" <[email protected]> 
> wrote:
> 
>> On Tue, 1 Apr 2014 14:40:40 -0400, Micheal Butz <[email protected]> 
>> wrote:
>> 
>> That was it thanks
>> 
>> Sent from my iPhone
>> 
>>> On Apr 1, 2014, at 7:26 AM, Andrew Armstrong <[email protected]> 
>>> 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 [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

Reply via email to