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



I've done something similar to the following to avoid hard coding the POS() value when using a subfield. We have files that have 12 date fields and I often create an array over them for easier processing.


dcl-ds CHA extname('CHNLANALP') qualified end-ds;


dcl-s FieldPtr pointer Inz(%Addr( CHA.Field01 ));

dcl-s FieldArray like(CHA.Field01) dim(32) Based( FieldPtr );



________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
Sent: Wednesday, June 13, 2018 1:06 PM
To: Midrange Systems Technical Discussion
Subject: RE: File having an array using new free form

EXTNAME brings in the external columns, so that won't allow you to make an array. My thought was to manually define your DS, rather than use EXTNAME. Plan B would be to define a second DS and just move your I/O DS to/from the second DS.



-----Original Message-----
From: Alan Shore [mailto:ashore@xxxxxxxx]
Sent: Tuesday, June 12, 2018 1:03 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: File having an array using new free form

Thanks for the reply Justin
The answer to your question is - I don't know Im having a complete moronic time at the moment

I have a file called CHNLANALP that has this dcl-ds CHA Extname('CHNLANALP') qualified end-ds; In the program The last 32 fields on this file need to be redefined as Indfield DIM(32)

But I just cannot see what I need to do

Hope that makes sense



Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019[cid:405712e7-5227-4e4b-aedd-b090199e3a90]
Phone [C] : (631) 880-8640[cid:ec0aef5a-7bbf-4385-b7f6-fe17cde683ae]
'If you're going through hell, keep going.'
Winston Churchill


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Justin Taylor
Sent: Tuesday, June 12, 2018 1:54 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: [EXTERNAL] RE: File having an array using new free form

Assuming you're asking about RPG, can't you just define you I/O data structure to contain an array?



-----Original Message-----
From: Alan Shore [mailto:ashore@xxxxxxxx]
Sent: Tuesday, June 12, 2018 12:33 PM
To: midrange-l@xxxxxxxxxxxx
Subject: File having an array using new free form

Hi everyone
Before I forget - we are on V7r1

Here is my situation - hope that it makes sense

I have defined a file where the last 32 fields on the record are all the same size Fields 1 through 31 represent the day of the month, with field 32 being the total of fields 1 through 31

How can I define these fields within my program (using new free-form) so that these 32 fields are an array That way, I can use the day of the month to determine which occurrence I need to deal with

Like I said - I hope my question makes sense

As always - all answers gratefully accepted

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019[cid:f226ba4e-dac7-421b-866d-3f812927c426]
Phone [C] : (631) 880-8640[cid:3b041a7d-6251-4e5a-9669-138c63858382]
'If you're going through hell, keep going.'
Winston Churchill


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx 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: http://amzn.to/2dEadiD


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
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: http://amzn.to/2dEadiD

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.