× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



One cannot Open or Close primary/secondary files. Which, if it had been necessary to go that route, is why I would have converted them to full procedural files.

Actually, the only real change, as far as the file processing goes, was to code the files thus:

FORDLIN IPE F 295 DISK EXTIND(*INU1)
FORDLINMC ISE F 345 DISK EXTIND(*INU2)

And

IORDLIN AA
I/copy qrpglesrc,ordlini
I 2 40 Control L2

IORDLINMC BB
I/copy qrpglesrc,ordlini
I 2 40 Control L2
I 297 297 mcyn
I 298 307 mccatc L1
I 308 339 mccatd
I 340 344 2mcsugr
I 345 345 mceryn

Since the logic was identical, except for the extra stuff (L1) used by the MC set, conditioning for that situation was painless. Turns out it was (unknown to me at the time, of course) quicker just to go ahead and make the changes. I ran the initial test against both data sets in one pass, and nothing barfed. The forms (invoices) even look like the original (thank goodness). Got more testing to do (this thing does more than just print the invoices).

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jonathan Mason
Sent: Thursday, August 21, 2008 12:47 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Cycleing - Multiple Input Files

Hi Jerry

Define one as a Primary and the other as a Secondary file. When your
program opens check the condition of the switch and if it's the Secondary
that you want try closing the Primary file and end the first cycle.
Hopefully the Secondary will start processing on the second cycle.

If the switch is set of the Primary file then on the first read of the
Secondary file set the *INLR indicator on to end the program.

I haven't tried it, but that's how I'd approach it.

All the best

Jonathan



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Adams
Sent: 21 August 2008 18:26
To: Midrange-L (midrange-l@xxxxxxxxxxxx)
Subject: Cycleing - Multiple Input Files

I have two RPG IV programs that are, for the most part, identical. While
there are a few additional bits of logic in the second one, the primary
difference is that the primary input file has a different record length.

What I would like to do is use the EXTIND(*INUx) keyword to condition the
two files; one as IPE the other as ISE. The CL that drives this would set
the appropriate switch. What I am not sure about is whether or not this is
permissible; can't recall ever doing this in even RPG II, and the manual
didn't answer the question. I can simply make the changes and see what
happens, but I thought if anyone knew that this won't fly it was save me
some time.

Changing the files to IF and USROPN, while perhaps possible, would not be
the best option if the former idea would work.

I really would like to merge these into a single program to cut down on the
maintenance headaches.

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.