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





>DHDRTBLMODS       DS                  OCCURS(100)
>DIhdr_Rec_Typ            1      1A
>DIhdr_as_len                2      3
>DIhdr_hosp_cod           4      6
>DIhdr_gr_fil                  7     16A
>DIhdr_fil_nam             17     26A
>DIhdr_cnt                  27     35s 0
>DIhdr_int_flg             36     36A
>DIhdr_f_spac            37     69A
>DIhdr_upd_dat           70     77A
>DIhdr_upd_tim           78     83A


>EVAL      Hdr_hosp_cod = Ihdr_hosp_cod(1)......

>I want to set the value of Hdr_hosp_code with    first index of
>Ihdr_hosp_code..will the above statement does the help for me?

Murali,

No. You have defined HDRTBLMODS as a multi occurrence data structure with
100 occurrences. However, in your EVAL statement, you treat
Ihdr_hosp_cod(1) as an array element - which it is not, it is a data
structure sub field.

For the above case, you need the OCCUR op code. This will set the data
structure to the correct occurrence BEFORE you do any data manipulation.


1          OCCUR     HDRTBLMODS

           EVAL      Hdr_hosp_cod = Ihdr_hosp_cod

Alternativly, set the OCCUR factor 1 to an numeric index field of length
3,0 and then set this to 1.

           EVAL      indVar = 1

indVar     OCCUR     HDRTBLMODS

           EVAL      Hdr_hosp_cod = Ihdr_hosp_cod

I don't know your setup but typically you could iterate thru the data
structure by putting the OCCUR and EVAL within a loop and setting the index
variable, indVar, to an incrementing loop counter.

Keith

PS. Please do not include replies to previous threads in a new post.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.