|
Dan, what release are you on? Didn't I hear something about an RPG equivelent to the 'MOVE CORRESPONDING' verb in COBOL using qualified data structures in V5R2? I just looked at the manual and found qualified data structures, but couldn't find anything about a move corresponding. I'm not sure i have your layout exactly as you mean it to be, but you might be able to get something like this to work ( i may have this backwards): d ds dim(24) d flda1 d flda2 d flda101 d flda102 *...etc... d ds d yflda1 dim(24) like(flda1) d yflda2 dim(24) like(flda2) d yflda101 dim(24) like(flda101) d yflda102 dim(24) like(flda102) *...etc... c movea flda1 yflda1 c movea flda2 yflda2 c movea flda101 yflda101 c movea flda102 yflda102 the effect of which is to move this format: flda1(1) flda2(1) flda101(1) fld102(1) flda1(2) flda2(2) flda101(2) fld102(2) flda1(3) flda2(3) flda101(3) fld102(3) etc... flda1(24) flda2(24) flda101(24) fld102(24) to this format: flda1(1) flda1(2) flda1(3) flda1(4) flda1(5)... thru (24) flda2(1) flda2(2) flda2(3) flda2(4) flda2(5)... thru (24) flda101(1) flda101(2) flda101(3) flda101(4) flda101(5)... thru (24) flda102(1) flda102(2) flda102(3) flda102(4) flda102(5)... thru (24) good luck, Rick. "I've been ordered to take you down to the bridge. Here I am, brain the size of a planet and they ask me to take you down to the bridge. Call that job satisfaction? 'Cos I don't." - Marvin the paranoid android ------original message--------- Here is the situation: 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) The fields flda101, flda102, ..., flda124 have the same size and map all to fldb11 and flda201, flda202, ..., flda224 are alike and map to fldb21 I tried to use pointer based arrays to... <snip>
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.