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

    From Don Allard@21:1/5 to All on Fri Nov 1 11:18:43 2019
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arthur T.@21:1/5 to Don Allard on Fri Nov 1 19:18:52 2019
    In
    Message-ID:<44825f6b-eb88-4269-aefa-6846085b342a@googlegroups.com>,
    Don Allard <dtallardjr@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 LISTSERV@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerard_Schildberger@21:1/5 to Arthur T. on Sat Nov 2 14:12:50 2019
    On Friday, November 1, 2019 at 6:20:22 PM UTC-5, Arthur T. wrote:
    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.

    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 LISTSERV@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

    There are other REXXes that have EXECIO available to them:
    R4
    ROO
    PC/REXX
    KEXX
    Personal REXX
    CTC REXX (possibly)
    _________________________________________ Gerard Schildberger



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thom@21:1/5 to Don Allard on Sun Nov 3 07:31:13 2019
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)