Can you manually set an EOF marker on an output stem?

31 views
Skip to first unread message

Don Allard

unread,
Nov 1, 2019, 2:18:44 PM11/1/19
to
I have a script that I run in batch that will read an input file, manipulate data based on certain conditions and move that data to an output stem variable. The data is in x12 format so a variable number of input records will constitute a transaction set. I also eliminate some transaction sets based on certain conditions. I write my output in a DO loop from the input stem one by one. My question is if it is possible to manually set an EOF marker into my output stem if I'm eliminating the last transaction set from the input file. I can add logic to forego setting my output stem records until I know whether I want to eliminate that set but it seems like a lot of work if it's possible to force REXX to recognize an EOF marker in my output stem so I can just use an EXECIO on the stem and anything I've written to the output stem subsequently is just junk I don't want written. I've searched REXX forums but don't find any references to doing what I want to do.

Arthur T.

unread,
Nov 1, 2019, 7:20:22 PM11/1/19
to
In
Message-ID:<44825f6b-eb88-4269...@googlegroups.com>,
Don Allard <dtall...@gmail.com> wrote:

>I have a script that I run in batch that will read an input file, manipulate data based on certain conditions and move that data to an output stem variable. The data is in x12 format so a variable number of input records will constitute a transaction set. I also eliminate some transaction sets based on certain conditions. I write my output in a DO loop from the input stem one by one. My question is if it is possible to manually set an EOF marker into my output stem if I'm eliminating the last transaction set from the input file. I can add logic to forego setting my output stem records until I know whether I want to eliminate that set but it seems like a lot of work if it's possible to force REXX to recognize an EOF marker in my output stem so I can just use an EXECIO on the stem and anything I've written to the output stem subsequently is just junk I don't want written. I've searched REXX forums but don't find any references to doing what I want to do.

If you'd like to use EXECIO, you're probably running on z/OS and
might do better to ask on the TSO REXX listserv:
"For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX"

Also, are you writing to a z/OS dataset or a Unix file? If the
former, you shouldn't need an EOF marker.

--
Arthur T. - ar23hur "at" pobox "dot" com

Gerard_Schildberger

unread,
Nov 2, 2019, 5:12:51 PM11/2/19
to
On Friday, November 1, 2019 at 6:20:22 PM UTC-5, Arthur T. wrote:
There are other REXXes that have EXECIO available to them:
R4
ROO
PC/REXX
KEXX
Personal REXX
CTC REXX (possibly)
_________________________________________ Gerard Schildberger



Thom

unread,
Nov 3, 2019, 10:31:15 AM11/3/19
to
On Friday, November 1, 2019 at 1:18:44 PM UTC-5, Don Allard wrote:
> I have a script that I run in batch that will read an input file, manipulate data based on certain conditions and move that data to an output stem variable. The data is in x12 format so a variable number of input records will constitute a transaction set. I also eliminate some transaction sets based on certain conditions. I write my output in a DO loop from the input stem one by one. My question is if it is possible to manually set an EOF marker into my output stem if I'm eliminating the last transaction set from the input file. I can add logic to forego setting my output stem records until I know whether I want to eliminate that set but it seems like a lot of work if it's possible to force REXX to recognize an EOF marker in my output stem so I can just use an EXECIO on the stem and anything I've written to the output stem subsequently is just junk I don't want written. I've searched REXX forums but don't find any references to doing what I want to do.

When I used to do this with EXECIO I just set the variable STEMNCAME.0 equal to then value of the number of records I wanted written and then proceeded to write them. If I recall correctly Ctrl-Z is the EOF char and I am sure you can find the hex character for that and add it to the stem and use it if you really want to although I am in agreement with those who say you do not need it.
Reply all
Reply to author
Forward
0 new messages