How to use OVRDBF on STDIN to read multiple files in REXX/400

15 pts.
Tags:
AS/400
OVRDBF
I can issue "OVRDBF" for STDIN to a file and then read the file with PARSE PULL commands. At EOF, I issue "DLTOVR STDIN" and then a new "OVRDBF" to read the another file. However, the first PARSE PULL for second file returns EOF. How can I get past this?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    Hard to say much without seeing code. I've never seen anyone try to read more than one STDIN before, so it's not clear if it's possible.

    Personally, I'd start by using embedded SQL if I wanted multiple files.
    31,805 pointsBadges:
    report
  • mgphl52
    Thanks for the suggestion. I'm trying to convert Rexx code from MVS to iSeries. It has *lots* of "EXECIO" commands, some accessing both multiple input and output files.
    15 pointsBadges:
    report
  • TheRealRaven
    Ouch. EXECIO, of course, is a mainframe function and not available to Rexx on any other platform. On IBM i, SQL would be the database I/O method of choice. I might not 'convert' any mainframe Rexx for use on IBM i. It's likely that ILE CL would be a much better vehicle for whatever functions Rexx is doing.

    Can you post two or three sections of Rexx that use EXECIO and add overviews of the purpose of EXECIO in each?

    You should know that IBM has ignored Rexx on IBM i (and earlier on iSeries and even earlier on OS/400). If as many as 1 out of 5 developers knew that Rex existed on their systems, much less how to run a Rexx proc, I'd be surprised. And of those who know Rexx is there, I'd be surprised if 1 in 10 has actually written a proc to do any work.

    A major reason is the relative slowness of the (interpreted) nature of Rexx and the required establishment of the Rexx environment when a proc is run. Since CL can do most of the same work a couple orders of magnitude faster (conservatively), there is little use for Rexx.

    Most sites wouldn't accept it in production. In almost 30 years on the platform, I can't recall a single production use. I don't doubt they exist -- mainframers have migrated over the years, and it takes time to convert everything.
    31,805 pointsBadges:
    report
  • TheRealRaven
    BTW, just to be sure, can you show the exact OVRDBF/DLTOVR commands in the Rexx code? It just occurred to me that they might need changes. Got too focused on Rexx.
    31,805 pointsBadges:
    report
  • GregManzo
    Have you closed & re-opened STDIN? The overrides only take effect in the OPEN - if you haven't closed & re-opened then your input is still trying to read the original file.
    2,895 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: