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



Agreed
Apologies
Just sent it over

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


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Monday, October 21, 2019 3:23 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] RE: Converting an RPG program to RPGILE to free form

This is probably better handled on the RPG list.

Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Alan Shore via MIDRANGE-L
Sent: Monday, October 21, 2019 3:13 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: Alan Shore <ashore@xxxxxxxx>
Subject: Converting an RPG program to RPGILE to free form

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


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

Phone [O] : (631) 200-5019

Phone [C] : (631) 880-8640

'If you're going through hell, keep going.'

Winston Churchill


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

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.