Discussion:
MI embedded in RPG (ZMILIB/CRTRPGMI?)
(too old to reply)
John Yeung
2014-10-23 18:33:59 UTC
Permalink
Raw Message
Hey folks, here's one you probably don't hear every day:

What are my options for compiling an RPG program that contains embedded MI code?

In my particular case, the RPG is RPG III or RPG/400, and it contains
what appear to be preprocessor directives #BEGIN and #END (the '#' is
in column 1), which delimit the MI code.

The comments at the top of the source indicate that ZMILIB must be in
the library list, and the program object created by the CRTRPGMI
command. As you may guess from the fact that I'm asking, these don't
exist anywhere on our current system, and I'm not having any luck
Googling these things.

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Rich Loeber
2014-10-23 18:44:47 UTC
Permalink
Raw Message
John,

I actually recognize this. These are directives from a VERY OLD product
that we sold that provided MI integration before IBM started to offer it.
If I recall correctly, is was called Ressemble/400 and was sold as an add
on to another product we had that dis-assembled *PGM objects into MI. The
ZMILIB is the application library where the decompiler and compiler were
kept.

This product was withdrawn from the market in the early 90's .... mostly
because the IBM support solution was easier to use and free.

There are other ways to include MI code. I'm sure someone else in this
list is familiar with the process.

Rich Loeber - @richloeber
Kisco Information Systems
[1]http://www.kisco.com

--------------------------------------------------------------------------

On 10/23/2014 2:33 PM, John Yeung wrote:

Hey folks, here's one you probably don't hear every day:

What are my options for compiling an RPG program that contains embedded MI code?

In my particular case, the RPG is RPG III or RPG/400, and it contains
what appear to be preprocessor directives #BEGIN and #END (the '#' is
in column 1), which delimit the MI code.

The comments at the top of the source indicate that ZMILIB must be in
the library list, and the program object created by the CRTRPGMI
command. As you may guess from the fact that I'm asking, these don't
exist anywhere on our current system, and I'm not having any luck
Googling these things.

John Y.

References

Visible links
1. http://www.kisco.com/
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
John R. Smith, Jr.
2014-10-23 18:50:05 UTC
Permalink
Raw Message
There is a C400-L list that deals with C, C++, and MI. I found them very
helpful in the past.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org] On Behalf Of Rich
Loeber
Sent: Thursday, October 23, 2014 2:45 PM
To: Midrange Systems Technical Discussion
Subject: Re: MI embedded in RPG (ZMILIB/CRTRPGMI?)

John,

I actually recognize this. These are directives from a VERY OLD product
that we sold that provided MI integration before IBM started to offer it.
If I recall correctly, is was called Ressemble/400 and was sold as an add
on to another product we had that dis-assembled *PGM objects into MI.
The
ZMILIB is the application library where the decompiler and compiler were
kept.

This product was withdrawn from the market in the early 90's .... mostly
because the IBM support solution was easier to use and free.

There are other ways to include MI code. I'm sure someone else in this
list is familiar with the process.

Rich Loeber - @richloeber
Kisco Information Systems
[1]http://www.kisco.com


--------------------------------------------------------------------------

On 10/23/2014 2:33 PM, John Yeung wrote:

Hey folks, here's one you probably don't hear every day:

What are my options for compiling an RPG program that contains embedded MI
code?

In my particular case, the RPG is RPG III or RPG/400, and it contains what
appear to be preprocessor directives #BEGIN and #END (the '#' is in column
1), which delimit the MI code.

The comments at the top of the source indicate that ZMILIB must be in the
library list, and the program object created by the CRTRPGMI command. As
you may guess from the fact that I'm asking, these don't exist anywhere on
our current system, and I'm not having any luck Googling these things.

John Y.

References

Visible links
1. http://www.kisco.com/
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org 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-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Jon Paris
2014-10-23 18:50:08 UTC
Permalink
Raw Message
Two options I can think of.

1) Convert the code to RPG IV and where needed call the C library MI functions.

2) Compile the base RPG with the option GENOPT(*LIST) and copy the relevant portions of the generated RPG into a source member and then insert the required MI instructions.

Option 1 is a better choice for the future - option 2 would be a pain to do manually but you could write code to do it for you - but if you have to write code why not go for option 1!


Jon Paris

www.partner400.com
www.SystemiDeveloper.com
Post by John Yeung
What are my options for compiling an RPG program that contains embedded MI code?
In my particular case, the RPG is RPG III or RPG/400, and it contains
what appear to be preprocessor directives #BEGIN and #END (the '#' is
in column 1), which delimit the MI code.
The comments at the top of the source indicate that ZMILIB must be in
the library list, and the program object created by the CRTRPGMI
command. As you may guess from the fact that I'm asking, these don't
exist anywhere on our current system, and I'm not having any luck
Googling these things.
John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
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-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
John Yeung
2014-10-23 21:59:31 UTC
Permalink
Raw Message
First of all, thanks to everyone who responded.

Jon, I had never thought to explore GENOPT(*LIST), and now that I
have, I must say I'm pretty impressed. The generated MI code even has
comments! As for the C-wrapper approach, once you mentioned it, I
started doing some more Googling and found this, which you may find
familiar:

http://www.ibmsystemsmag.com/ibmi/developer/rpg/Utilizing-MI-Functions-in-RPG-Programs/

Yeah, it's 10 years old, but that still makes it several years newer
than the program I'm dealing with.

I have follow-up comments for some of the other respondents as well,
but right now I've got to run.

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Peter Dow
2014-10-23 20:08:00 UTC
Permalink
Raw Message
Hi John,

I have the source for a CRTMIPGM command (with associated CLP and RPGLE
programs) that has the following comment:

* CREATE MI PROGRAM
*
* Uses QPRCRTPG API to create a program from MI source.
* Source statements are loaded from the source member into array
MI, then
* the API is called to create the program.
*
* The basis for this was a program written by Leif Svalgaard for
the MI400-L
* mailing list at www.midrange.com on 11/08/1999.

Not exactly what you were looking for, but suggests to me that someone
wrote something similar that pre-processes source containing RPG and MI
and creates a *PGM object from it.

If you're interested, I can send you the source.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow-***@public.gmane.org <mailto:petercdow-***@public.gmane.org>
pdow-***@public.gmane.org <mailto:pdow-***@public.gmane.org>

/
Post by John Yeung
What are my options for compiling an RPG program that contains embedded MI code?
In my particular case, the RPG is RPG III or RPG/400, and it contains
what appear to be preprocessor directives #BEGIN and #END (the '#' is
in column 1), which delimit the MI code.
The comments at the top of the source indicate that ZMILIB must be in
the library list, and the program object created by the CRTRPGMI
command. As you may guess from the fact that I'm asking, these don't
exist anywhere on our current system, and I'm not having any luck
Googling these things.
John Y.
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Buck Calabro
2014-10-23 20:36:51 UTC
Permalink
Raw Message
Post by Jon Paris
Two options I can think of.
1) Convert the code to RPG IV and where needed call the C library MI functions.
This is easier than it seems at first blush.
Post by Jon Paris
Post by John Yeung
What are my options for compiling an RPG program that contains embedded MI code?
In my particular case, the RPG is RPG III or RPG/400, and it contains
what appear to be preprocessor directives #BEGIN and #END (the '#' is
in column 1), which delimit the MI code.
The comments at the top of the source indicate that ZMILIB must be in
the library list, and the program object created by the CRTRPGMI
command. As you may guess from the fact that I'm asking, these don't
exist anywhere on our current system, and I'm not having any luck
Googling these things.
I have some actual, honest to goodness MI programs that I use for
various housekeeping chores. No production level stuff; that would
drive the other developers in the group mad. If you have a situation
where the #BEGIN and #END bracket an entire MI program [1] then you
might want to scrap the RPG 'wrapper' and just compile the MI program as-is.

--buck

[1] A complete MI program has some DCL statements, almost certainly DCL
DD and DCL SPCPTR. It will also have some opcodes like MATPRATR. It'll
end with PEND and every line will terminate in a semicolon.
--
'I had nothing to offer anybody except my own confusion' - Jack Kerouac
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-Zwy7GipZuJhWk0Htik3J/***@public.gmane.org
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Loading...