|
Hello,
a) Yes, you can call an ILE RPG program from RPG II in the S/36
environment. But, if you pass numeric parameters, make sure you
understand at which times the RPG II language uses zoned and at which
time it uses packed.
b) No, an ILE RPG program cannot open/close a file that's open in
another program. (Nor can any other language).
My suggestion is that you upgrade this particular program to ILE RPG
(or, at least RPG/400) which can easily use the OPEN and CLOSE op-codes
to open and close the file.
Minor changes to the RPG II program should make it into an RPG III
program. Then you can use the OPEN and CLOSE operations -- or run
CVTRPGSRC to make it into an RPG IV (ILE RPG) program. It's really
easy, and the code doesn't have to change significantly.
But, RPG II is a programming language that hasn't been enhanced in 30
years. Don't be too surprised if it's missing features.
Kevin Nunn wrote:
Hello All,on
I've searched the vast internet and my problem is just too old to show up
anywhere :)
I used to be a consult for 4 clients on Advanced/36 machines, I know RPG2
inside out. 2 Years ago I took a full time job with one of my clients as
work was way to slow. I finally got them on a used AS400 and I am working
rewriting their software in RPGILE (love it!).a
Two of my other clients have converted over to an AS400 with the help of
consultant company in my area. The last client has finally decided to getan
AS400, but they want to completely retain the programs as is. No,problem,
they'll be just run in a S/36 environment.file
The problem is, several of their programs use an IBM supplied subroutine
called SUBROC to open/close a file. We used it to open/close the spool
in order to print without exiting the program. For on demand checks foran
instance.
Does anyone know of a work around for this? My first thought was to write
ILE program that would be called from the S36 program, but 1) Not sure ifa
ILE program can be called from a S36 RPG program, I think CL can, so itand
should work; 2) Would the called ILE program have the access to the file
be able to CLOSE the file, and then re-OPEN it.
Or is there some other way I could do this without exiting the program,
which would in effect, clear all the temp fields that are used?
Thanks - and I wanted to say I have really been enjoying reading the
discussions, it's been helping my learning process :)
Kev
--
This is the RPG programming on the AS400 / 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 mailing list archive is Copyright 1997-2025 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.