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



There isn't.

Anything defined in the calcs of RPG400 is packed.



On Oct 21, 2019, at 3:55 PM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:

Alan,

IIRC, RPG defaults to packed when defining a field. In fact, I don't
remember if there is a way to define a zoned field on a "C-Spec" line.

Best Regards,
Luis Rodriguez

--



On Mon, 21 Oct 2019 at 15:50, Alan Shore via RPG400-L <
rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

When I change the dcl-s swapdt to packed

dcl-s Swapdt packed(8:0) inz(0);

and remove the 8 0 from the call
I do NOT get decimal data errors


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: Alan Shore
Sent: Monday, October 21, 2019 3:45 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: [EXTERNAL] Re: Converting an RPG program to RPGILE to free
form

Thanks for your reply Luis
When I convert to free, THAT'S one of the things I am not that sure about

Let me see

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: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of
Luis Rodriguez
Sent: Monday, October 21, 2019 3:38 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re: Converting an RPG program to RPGILE to free form

Alan,

Shouldn't the parameter be a packed number?

Regards,

Luis Rodriguez

--



On Mon, 21 Oct 2019 at 15:25, Alan Shore via RPG400-L <
rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

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

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-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 RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-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 RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-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 RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-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 ...

Follow-Ups:
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.