× 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,
 
I have a regular record in a regular file with 10 like fields in the
record (3 digit error codes)
 
When I read the record in, I want these 10 error codes to automatically
appear in a 10 element array.
 
I know this can be done, but I'm at a loss on how to set up my "D" Specs,
or even how to look up what I want to do...
Help?  Anyone... (I'm at v5r3m0)
 
certainly there are several solutions, but I prefer the following:
Let's say your fields are named ERR01, ERR02,... ERR10
 
Define a data structure containing these fields and overlay the data
structure through an array.
You simply have to list the fields. Adding a definition or a from/to
specification is not necessary, because the fields are already defined
through the F-Specs.
 
FMyFile    IF   E             DISK 
 
*---------------------------------------------------------------------------
------ 
D  DsMyFile       DS                                                       
D    Err1                                                                  
D    Err2                                                                  
D    Err3                                                                  
D    Err4                                                                  
D    Err5                                                                  
D    Err6                                                                  
D    Err7                                                                  
D    Err8                                                                  
D    Err9                                                                  
D    Err10                                                                 
D  ArrayErr                           like(Err1) Overlay(DSMyFile) Dim(10)

 
*---------------------------------------------------------------------------
------
 /Free
    Read MyFileFmt;
    Dsply ArrayErr(1);
    *InLR = *On;
 /EndIf; 

 

 

Mit freundlichen Grüßen

 

i.A. Birgitta Hauser

 

LUNZER + PARTNER GMBH

Consulting | Software | Service

Carl-Zeiss-Straße 1

63755 Alzenau

 

Tel:             + 49 6023 951-255

Fax:            + 49 6023 951-111

Internet:      www.lp-gmbh.com <http://www.lp-gmbh.com/> 

                  www.rpg-schulung.de <http://www.rpg-schulung.de/> 

 

--------------------------------------------------------

Handelsregister: Aschaffenburg HRB 4720

Gerichtsstand und Erfüllungsort Alzenau

Ust-IdNr.: DE132093146

Geschäftsführer: Rudolf Gerbert

---------------------------------------------------------

 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.