Hello Greg,
Are you on par with PTF's? Although I think the teething problems would be solved by now, these kind of problems may emerge from being behind with PTF's.
Kind regards,
Martijn van Breden
lead software architect
________________________________
Van: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> namens Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
Verzonden: maandag 15 april 2024 22:53
Aan: rpg400-l@xxxxxxxxxxxxxxxxxx <rpg400-l@xxxxxxxxxxxxxxxxxx>
Onderwerp: Comparing data in data structures
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.
I'm at my wits end...
I am trying to compare two address data structures to see if they are different. BOTH are defined "like" a template ds, however one is dimensional (3).
Can anyone point out what I may be missing??
TIA
Greg
Code:
dcl-ds upsAddr_t qualified template;
name varchar(40);
street varchar(50);
street2 varchar(50);
street3 varchar(50);
city varchar(30);
state varchar(30);
zipcode varchar(10);
cntry varchar(2);
end-ds;
dcl-ds ups likeds(upsAddr_t) inz;
dcl-ds upsSugg likeds(upsAddr_t) dim(3) inz;
if ups.name <> upsSugg(x).name;
diff = *on;
endif;
if ups.street <> upsSugg(x).street;
diff = *on;
endif;
if ups.street2 <> upsSugg(x).street2;
diff = *on;
endif;
if ups.street3 <> upsSugg(x).street3;
diff = *on;
endif;
if ups.city <> upsSugg(x).city;
diff = *on;
endif;
if ups.state <> upsSugg(x).state;
diff = *on;
endif;
if ups.zipcode <> upsSugg(x).zipcode;
diff = *on;
endif;
if ups.cntry <> upsSugg(x).cntry;
diff = *on;
endif;
// In Debug... diff is still *OFF at this point
// In this expression.. DIFF turns ON
if ups <> upsSugg(x);
diff = *on;
endif;
[Logo]<
https://www.totalbizfulfillment.com/> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
1 Corporate Dr
Grantsville, MD 21536
www.totalbizfulfillment.com<
http://www.totalbizfulfillment.com><
http://www.totalbizfulfillment.com<
http://www.totalbizfulfillment.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.
As an Amazon Associate we earn from qualifying purchases.