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



Hi everyone
Thanks for your replies

As far as my own mentality - moronic state - day 2

Jim - I understand what you are saying and I went back to my code and tried to change it the way you have it below
But it wont compile

The f spec of the file is
dcl-f Chnlanalp usage(*output:*update) keyed prefix('CHA.');

with the dcl-ds as
dcl-ds CHA Extname('CHNLANALP') qualified end-ds;

Because the file is now qualified, how do I define these 32 fields as an array, that will automatically populate after each read AND will also automatically populate the record if I change one of the occurrences



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: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Wednesday, June 13, 2018 6:08 AM
To: Midrange-L Midrange-l <midrange-l@xxxxxxxxxxxx>
Subject: [EXTERNAL] Re: File having an array using new free form

Very easy - if a little tedious to type for that many fields.

dcl-ds days;
fieldName1; // No need to define type or length
fieldName2;
...
fieldName31;

field Like(fieldName1) Pos(1) Dim(31); end-ds;

Array is populated the minute the record is read.

That's how I would do it. There is also an approach using the file to provide an externally described DS but it can get ugly if the fields needed are not the first in the record.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jun 12, 2018, at 6:33 PM, Alan Shore <ashore@xxxxxxxx> wrote:

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
Phone [C] : (631) 880-8640
'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 ...

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.