Jon,
But RDi checks much more as SEU would do. In both cases you get an error
by RDi.
You're right, normally nobody would use Op-codes as field specs, but you
never know...
Happy New Year everybody.
Karl.
-------- Ursprüngliche Nachricht --------
Von: Jon Paris <jon.paris@xxxxxxxxxxxxxx>
Datum: Do., 31. Dez. 2020, 18:36
An: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Betreff: Re: Web Service DS Layout
Nope. At the point in time when the compiler is looking for a field
name it is not considering that. Qualification comes into play during
name resolution which occurs much later.
Look at this code snippet.
Dcl-F myFile;
Dcl-ds myDS;
Afield char(10);
Read myFile;
....
What is the error here? Missing dcl-subf - or missing end-ds - or ...
In completely free-form the compiler has to decide what the current line
represents - a calc or a declaration. When it sees something it thinks
is a opcode it will assume a calc and try to make sense of it that way.
Later on it would probably work out that an end-ds was missing - but
that determination is made much later.
Barbara would be able to explain it far better.
Jon
> On Dec 31, 2020, at 11:40 AM, (WalzCraft) Jerry Forss
<JForss@xxxxxxxxxxxxx> wrote:
>
> Like Karl, I thought the Qualified would have taken care of that.
>
> Fun to learn something new.
>
> -----Original Message-----
> From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon
Paris
> Sent: Thursday, December 31, 2020 10:01 AM
> To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
> Subject: Re: Web Service DS Layout
>
> That's because you have never been foolish enough to name a variable
after an RPG op-code. Sadly in this case you had no choice as somebody
else determined the name to be used.
>
> Had you coded D specs the problem would never have arisen because the
field name would have been in the name "box" and therefore the compiler
would not be confused.
>
>
>
>> On Dec 31, 2020, at 10:54 AM, (WalzCraft) Jerry Forss
<JForss@xxxxxxxxxxxxx> wrote:
>>
>> Perfect!
>>
>> I have never used the Dcl-SubF before.
>>
>> -----Original Message-----
>> From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Mark
>> Waterbury
>> Sent: Thursday, December 31, 2020 9:50 AM
>> To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
>> Subject: Re: Web Service DS Layout
>>
>> Dcl-SubF is needed for reserved words ... see below.
>>
>> On Thursday, December 31, 2020, 10:37:06 AM EST, Jerry Forss
<jforss@xxxxxxxxxxxxx> wrote:
>>
>> I figured it out, mostly. The For is still an issue. Ideas?
>>
>> New DS
>>
>> Dcl-ds ItemizedCharges;
>> cnt_Item Int(5);
>> Dcl-ds Item Dim(10);
>>
>> Type Char(10);
>> Dcl-SubF For Char(10);
>> Amount Char(10);
>> Description VarChar(100);
>> Rate Char(10);
>> End-Ds;
>> End-Ds;
>>
>>
>> -----Original Message-----
>> From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
>> (WalzCraft) Jerry Forss
>> Sent: Thursday, December 31, 2020 8:47 AM
>> To: rpg400-l@xxxxxxxxxxxxxxxxxx
>> Subject: Web Service DS Layout
>>
>> Hi All,
>>
>> I am sure this is simple but is eluding me. My brain is getting ready
for 2021.
>>
>> Here is the XLM I am getting back.
>>
>> <ITEMIZEDCHARGES>
>> <ITEM TYPE="CHARGE" FOR="FREIGHT" AMOUNT="565.38" DESCRIPTION="45 LB
>> CL70, 1 PLT @ 40 x 24 x 36 IN"/> <ITEM TYPE="DISCOUNT" FOR="SHIPPER"
>> AMOUNT="-491.88" DESCRIPTION="SHIPPER DISCOUNT" RATE="87%"/> <ITEM
>> TYPE="CHARGE" FOR="MCADJ" AMOUNT="76.50" DESCRIPTION="ABSOLUTE MIN
>> CHARGE ADJUSTMENT"/> <ITEM TYPE="CHARGE" FOR="SS" AMOUNT="0.00"
>> DESCRIPTION="/ SINGLE SHIPMENT"/> <ITEM TYPE="CHARGE" FOR="FSC"
>> AMOUNT="33.45" DESCRIPTION="/ FUEL SURCHARGE" RATE="22.3%"/> <ITEM
>> TYPE="DISCOUNT" FOR="DYNDISC" AMOUNT="-61.05" DESCRIPTION="DYNAMIC
>> DISCOUNT"/> </ITEMIZEDCHARGES>
>>
>> My code
>>
>> cnt_ItemizedCharges Int(5);
>> Dcl-ds ItemizedCharges Dim(10);
>> Item_Type Char(10); //
For Char(10);
>> Amount Char(10);
>> Description VarChar(100);
>> Rate Char(10);
>> End-Ds;
>>
>>
>> XMLOptions = 'doc=file +
>> path=ABF +
>> case=convert +
>> allowextra=yes +
>> allowmissing=yes +
>> countprefix=cnt_ +
>> ns=remove';
>>
>> Monitor;
>>
>> // Parse Response XML Doc
>> xml-into ABF %xml(%Trim(ResponseFile) : %Trim(XMLOptions));
>>
>> The cnt_ItemizedCharges is coming back as 1 and the ItemizedCharges
DS is blank.
>> How should this DS be formatted?
>>
>> I had to comment out the For because the compiler sees it as a
reserved word.
>> How do I rename the For so I can have it in the DS?
>>
>>
>>
>> Subject to Change Notice:
>>
>> WalzCraft reserves the right to improve designs, and to change
specifications without notice.
>>
>> Confidentiality Notice:
>>
>> This message and any attachments may contain confidential and
>> privileged information that is protected by law. The information
>> contained herein is transmitted for the sole use of the intended
>> recipient(s) and should "only" pertain to "WalzCraft" company
matters.
>> If you are not the intended recipient or designated agent of the
>> recipient of such information, you are hereby notified that any use,
>> dissemination, copying or retention of this email or the information
>> contained herein is strictly prohibited and may subject you to
>> penalties under federal and/or state law. If you received this email
>> in error, please notify the sender immediately and permanently delete
>> this email. Thank You
>>
>> WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
>> www.walzcraft.com<
http://www.walzcraft.com> Phone: 1-800-237-1326
>> --
>> 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@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
>>
>> Help support midrange.com by shopping at amazon.com with our
affiliate
>> link:
https://amazon.midrange.com
>>
>>
>>
>> Subject to Change Notice:
>>
>> WalzCraft reserves the right to improve designs, and to change
specifications without notice.
>>
>> Confidentiality Notice:
>>
>> This message and any attachments may contain confidential and
>> privileged information that is protected by law. The information
>> contained herein is transmitted for the sole use of the intended
>> recipient(s) and should "only" pertain to "WalzCraft" company
matters.
>> If you are not the intended recipient or designated agent of the
>> recipient of such information, you are hereby notified that any use,
>> dissemination, copying or retention of this email or the information
>> contained herein is strictly prohibited and may subject you to
>> penalties under federal and/or state law. If you received this email
>> in error, please notify the sender immediately and permanently delete
>> this email. Thank You
>>
>> WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
>> www.walzcraft.com<
http://www.walzcraft.com> Phone: 1-800-237-1326
>> --
>> 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@xxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
>>
>> Help support midrange.com by shopping at amazon.com with our
affiliate
>> link:
https://amazon.midrange.com
>>
>>
>>
>> Subject to Change Notice:
>>
>> WalzCraft reserves the right to improve designs, and to change
specifications without notice.
>>
>> Confidentiality Notice:
>>
>> This message and any attachments may contain confidential and
>> privileged information that is protected by law. The information
>> contained herein is transmitted for the sole use of the intended
>> recipient(s) and should "only" pertain to "WalzCraft" company
matters.
>> If you are not the intended recipient or designated agent of the
>> recipient of such information, you are hereby notified that any use,
>> dissemination, copying or retention of this email or the information
>> contained herein is strictly prohibited and may subject you to
>> penalties under federal and/or state law. If you received this email
>> in error, please notify the sender immediately and permanently delete
>> this email. Thank You
>>
>> WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
>> www.walzcraft.com<
http://www.walzcraft.com> Phone: 1-800-237-1326
>> --
>> 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@xxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
>
> Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://amazon.midrange.com
>
>
>
> Subject to Change Notice:
>
> WalzCraft reserves the right to improve designs, and to change
specifications without notice.
>
> Confidentiality Notice:
>
> This message and any attachments may contain confidential and
privileged information that is protected by law. The information
contained herein is transmitted for the sole use of the intended
recipient(s) and should "only" pertain to "WalzCraft" company matters.
If you are not the intended recipient or designated agent of the
recipient of such information, you are hereby notified that any use,
dissemination, copying or retention of this email or the information
contained herein is strictly prohibited and may subject you to penalties
under federal and/or state law. If you received this email in error,
please notify the sender immediately and permanently delete this email.
Thank You
>
> WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
> www.walzcraft.com<
http://www.walzcraft.com> Phone: 1-800-237-1326
> --
> 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@xxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxx 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.