|
Hi Alan
THAT'S the problem - I WOULD expect an error
But when the code is like this
C CALL 'SWAP'
C DUEDAT PARM DUEDAT SWAPDT 8 0
Where SWAPDT is defined in the c-spec, It doesn't error
When I define SWAPDT as dcl-s and remove the 8 0 from the line above - it DOES error
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 Alan Campin
Sent: Monday, October 21, 2019 3:29 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re: Converting an RPG program to RPGILE to free form
I don't quite get it. You are expecting an 8/0 field, maybe zoned or maybe packed but you are passing a zoned 6,0. why wouldn't you have an error?
On Mon, Oct 21, 2019 at 3:19 PM Peter Dow <petercdow@xxxxxxxxx> wrote:
Hi Alan,--
Can you show us the relevant code in the calling program, as well as
in SWAP?
--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx> pdow@xxxxxxxxxxxxxx
<mailto:pdow@xxxxxxxxxxxxxx> /
On 10/21/2019 12:12 PM, Alan Shore via MIDRANGE-L wrote:
Hi everyonethe command CVTRPGSRC - Convert RPG Source)
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 conversion is good as I have tested it and obtain the sameas the RPG version
results
I am now taking this one step further, by converting the RPGILE toform
Free
I test the "new" version after each step0 from the line above
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
When I tested this change, I received decimal data error0 - but DUEDAT is defined in this program as
Looking at the program called SWAP, I see that the input parameter
is 8
dcl-ds Duedtds;20OIDUEM
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
I 340OIDUED
I 560OIDUEY
I 160OIDUEDAT
with the field SWAPDT defined in the C specs, as above
This is throwing me for a loop, as I cannot explain why it is
working
I am hoping someone can explain this AND how to move forward inconverting 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 email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
--
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
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 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.