× 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.



RPG III is getting pretty old. If the following is not relevant to RPG III, please excuse my losing track of when what happened & where.

A third choice might be to mark the display file as UC in the F-spec at columns 71-72. Then, check the programs' external switches. Find one not being used, and use that as your marker in place of a second parm.

Lets say, for discussion, that you find U7 is unused in your application. Set on U7 in your new scheduled run, and then in Program 1, if U7 is _NOT_ on, open the display file. Use NU7 to condition your display file programs. That should take care of Program 1. Program 2 can use U7 to decide if it was called old-way or new-way.



On 7/9/2013 9:32 PM, John McKee wrote:
There are two vendor supplied programs, written in RPG III. The first
program prepares the environment for the second program.

Originally, intent was that first program would be initiated from a
menu. Now, in addition to that, it also needs to be capable of being
submitted by a scheduled job.

I can clone the first program with a new name and then modify it to
not require a display file. But, second program would also need to be
modified as it checks how it was called.

I see two possibilities here:

1) Create clone of first progra and modify second program to recognize
the validity of the second program.

2) Add a parm to the first program to indicate portions of code should
be bypassed. But, the problem as I see it, is that the existing
invocation of the first program has no provision for a parameter. If
program is called without a parameter, it will fail.

Is there a way to test for a missing parameter with RPG III?

I thought about using the LDA, but that is formatted already. Might
be possible to use it, but unknown at this point.

Any suggestions to deal with this?

John McKee



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.