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



I thought about that, Booth. Problem is when the first program is
launched for user interaction, it is done from a menu processing
program. I have no idea if any program switches are set, or if the
value can be counted on to be reliable. Starts getting uglier.

Definitely nice to use.

Thanks for the reminder.

John McKee

On Tue, Jul 9, 2013 at 10:06 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:
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


--
Booth Martin
802-461-5349
http://www.martinvt.com
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.