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



Can you show an extract from the actual record layout Duane - I'm having trouble visualizing what you're trying to do.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jun 5, 2019, at 8:55 AM, Duane Scott <dscott@xxxxxxxxxxx> wrote:

Barbara (or other excellent explainer),

This is a great feature. Except it's not working as I imagined it and as Jon Paris "exampled" it in his article in The Four Hundred: Guru: 7.4 Brings New RPG Goodies.

I've tried to work this one in on my 7.3 and am having a difficult time adjusting it to work.

My example tries to redefine a record format where 18 sets of an 8 byte character followed by a 1 byte character:

dcl-f history1 usage(*input); // rcdfmt(hst1)
dcl-ds ds_hst1 likerec(hst1) ;
dcl-ds ar_hst1 extname('HISTORY1' : 'HST1') qualified;
diag1_set like(hdiag1) samepos(hdiag1);
dcl-ds set_diag dim(18) samepos(hdiag1);
hdiag like(hdiag1);
hdiagpoa like(hdiag1poa);
end-ds;
end-ds;

when compiling, I get:
RNF3523: External description SET_DIAG for data structure is not found; data structure is ignored.

My outline (RDi) shows that SET_DIAG has the correct elements.

I did get it to work as advertised on a single field array.

Any suggestions?


Duane Scott

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Barbara Morris
Sent: Wednesday, April 24, 2019 10:21 AM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: PTF enhancements for RPG

On 2019-04-23 6:06 PM, Jon Paris wrote:
The one thing this one can't do easily Joe is to create an array from non-contiguous fields - that you'll still have to use the DS/Overlay approach for.


If they were all the same distance apart, you could define a data structure array with all the repeated fields.

dcl-ds ds;
x char(5);
a1 packed(3);
b1 char(5);
a2 packed(5);
b2 char(5);
a3 char(5);
b3 char(5);
dcl-ds a_b_array dim(3) samepos(a1);
a like(a1);
b like(b1);
end-ds;
end-ds;

--
Barbara

--
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
CONFIDENTIALITY NOTICE: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact NALC Health Benefit Plan at 703-729-4677 and delete and destroy the original message and all copies.
--
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.