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



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on 10/24/2019
12:00:23 PM:
"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on 10/24/2019
10:16:27 AM:
Calling external programs

The code I have is
SWAP C CALL 'SWAP'
SWAP C DUEDAT PARM DUEDAT SWAPDT

Its been a while since I saw this type of code, but I believe the
translation is
Call program SWAP using the parameter SWAPDT, but populating SWAPDT
from the field DUEDAT and inserting the answer back into DUEDAT when
returning from the called program SWAP

The field SWAPDT is defined as
dcl-s Swapdt packed(8:0) inz(0);
The field DUEDAT is defined
dcl-ds Duedtds;
Duedat zoned(6:0);
Oiduem zoned(2:0) Pos(1);
Oidued zoned(2:0) Pos(3);
Oiduey zoned(2:0) Pos(5);
end-ds;

How would the call translate into free?


Why not just do this?

dcl-pr SWAP ExtPgm();
SWAPDT Packed(8);
end-pr;

SWAP(DUEDAT);


Oh, I see why... because there is a data type conversion
involved. So, yes, three step process required.


Sincerely,

Dave Clark

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.