|
I want to convert filea with a format like: flda1 flda2 flda101 flda102 ... flda124 flda201 flda202 ... flda224
to fileb that looks like: fldb1 fldb2 fldb11 fldb21 fldb1 fldb2 fldb11 fldb21 . . . fldb1 fldb2 fldb11 fldb21 (times 24)
* * C_Template convert filea - horizontal to fileb - vertical * *---------------------------------------------------------------- ffilea if e k disk ffileb uf a e k disk
darra1 s 3 0 dim(24) based(ptr1) darra2 s 8 0 dim(24) based(ptr2) dptr1 s * inz(*null) dptr2 s * inz(*null)
c dou %eof(filea) c clear ptr1 c clear ptr2 c read(e) filea c if %eof(filea) c leave c endif c clear c_rec * set pointer1 and pointer2 c eval ptr1 = %addr(flda101) c eval ptr2 = %addr(flda201) * at this point arra1 and arra2 should have all the data loaded. c z-add 0 i 2 0 * requirements and their dates c 1 do 24 i c if ptr1 <> *null c eval fldb1 = arra1(i) c endif c if ptr2 <> *null c eval fldb2 = arra2(i) c endif c write c_rec c enddo
As an Amazon Associate we earn from qualifying purchases.
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.