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



How about better.

dcl-ds dsHeader_Columns Qualified;
Hdr_Col_A VarChar(35) Inz('Row_Number');
Hdr_Col_B VarChar(35) Inz('Zero Part Number');
Hdr_Col_C VarChar(35) Inz('Status');
Hdr_Col_D VarChar(35) Inz('AX Part No');
Hdr_Col_E VarChar(35) Inz('Vendor - Holly ADD');
Hdr_Col_F VarChar(35) Inz('lbs/ft conversion Holly');
Hdr_Col_G VarChar(35) Inz('lbs/pc (if pc is 10.5ft)');
Hdr_Col_H VarChar(35) Inz('inches per piece');
... additional columns to 58.
ColumnList VarChar(35) Dim(58) Overlay(dsHeader_Columns);
end-ds;

Then reference it as follows:

If StrVal <> dsHeader_Columns.ColumnList(Header_Column);

In other words, array is defined as Varying and you don't have to trim.

You don't defined StrVal but I asume varying? If StrVal is defined as Char
the comparison probably won't work.

If defined as VarChar and blanks are trimmed it will work.

Also, you don't really need the qualified. The following is just as valid.

dcl-ds dsHeader_Columns;
Hdr_Col_A VarChar(35) Inz('Row_Number');
Hdr_Col_B VarChar(35) Inz('Zero Part Number');
Hdr_Col_C VarChar(35) Inz('Status');
Hdr_Col_D VarChar(35) Inz('AX Part No');
Hdr_Col_E VarChar(35) Inz('Vendor - Holly ADD');
Hdr_Col_F VarChar(35) Inz('lbs/ft conversion Holly');
Hdr_Col_G VarChar(35) Inz('lbs/pc (if pc is 10.5ft)');
Hdr_Col_H VarChar(35) Inz('inches per piece');
... additional columns to 58.
ColumnList VarChar(35) Dim(58) Overlay(dsHeader_Columns);
end-ds;

Then reference it as follows:

If StrVal <> ColumnList(Header_Column);



On Wed, Jun 22, 2016 at 2:14 PM, <dlclark@xxxxxxxxxxxxxxxx> wrote:

"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 06/22/2016
05:01:07 PM:
I tried to define an array but the DIM needs qualified and the resulting
use
if the array processing is not working. Guess I do not know how to.

If there are supposed to be 58 columns then I think you want this:

d dsHeader_Columns...
d ds qualified
d Hdr_Col_A 35a inz('Row_Number')
d Hdr_Col_B 35a Inz('Zero Part Number')
d Hdr_Col_C 35a inz('Status')
d Hdr_Col_D 35a inz('AX Part No')
d Hdr_Col_E 35a inz('Vendor - Holly ADD')
d Hdr_Col_F 35a inz('lbs/ft conversion -
Holly')
d Hdr_Col_G 35a inz('lbs/pc (if pc is 10.5ft)')
d Hdr_Col_H 35a inz('inches per piece')
d item 35a dim(58)
overlay(dsHeader_Columns:1)

Then reference it as follows:

if StrVal <> %trim(dsHeader_Columns.item(Header_Column));

Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331




*********************************************************************************************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.

*********************************************************************************************
--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


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.