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



Hi everyone

Before I forget - we are on V7r3



I have been asked to make a change to an RPG program

Whenever I have this situation, I convert the program to RPGILE (using the command CVTRPGSRC - Convert RPG Source)

The conversion is good as I have tested it and obtain the same results as the RPG version

I am now taking this one step further, by converting the RPGILE to Free form

I test the "new" version after each step

So far so good



Here is my quandary

I have the following code - yet to be converted


C CALL 'SWAP'
C DUEDAT PARM DUEDAT SWAPDT 8 0
C CALL 'SWAP'
C INVDAT PARM INVDAT SWAPDT
C CALL 'SWAP'
C OIPDAT PARM OIPDAT SWAPDT
C CALL 'SWAP'
C OIPD1 PARM OIPD1 SWAPDT
C CALL 'SWAP'
C OIPD2 PARM OIPD2 SWAPDT
C CALL 'SWAP'
C OIPD3 PARM OIPD3 SWAPDT
C CALL 'SWAP'
C PAIDDT PARM PAIDDT SWAPDT
C CALL 'SWAP'
C INDATE PARM INDATE SWAPDT
C CALL 'SWAP'

C CALPDT PARM CALPDT SWAPDT



I replaced the definition of SWAPDT with a dcl-s line and removed the 8 0 from the line above

When I tested this change, I received decimal data error

Looking at the program called SWAP, I see that the input parameter is 8 0 - but DUEDAT is defined in this program as
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;



I DS

I 1 20OIDUEM

I 3 40OIDUED

I 5 60OIDUEY

I 1 60OIDUEDAT



This is throwing me for a loop, as I cannot explain why it is working with the field SWAPDT defined in the C specs, as above

I am hoping someone can explain this AND how to move forward in converting to Free form





I hope this all makes sense


Alan Shore
E-mail : ASHORE@xxxxxxxx<mailto:ASHORE@xxxxxxxx>
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.