Page 1 of 1

is it possible yo unstring a record as in cobol using easytr

PostPosted: Thu Jul 02, 2009 7:46 am
by manojlives
is it possible yo unstring a record as in cobol using easytrieve?
File1:
abcdef ghihj kloj dfdf
mjki mjki loiu
jill msdssd lok

File2:
abcdef
mjki
jill

If file2 fields match file1, i need to unstring file1 record and write them. i Tried with index, but its going bit complex, can any one help me out
My ouput:
ghihj
kloj
dfdf
mjki
loiu
msdssd
lok

Re: is it possible yo unstring a record as in cobol using easytr

PostPosted: Thu Jul 02, 2009 8:30 am
by dick scherrer
Hello,

You can get the values "unstrung" by using a loop and subscripting (there is no unstring builtin in Easytrieve as far as i've seen).

A bit more of a challenge will be the "match" between the variable length "keys".

Keep in mind that once upon a time, there was neither UNSTRING nor reference modification in cobol, so we did everything like this with one-byte arrays (multiples of them :) ) . . .

It may be best to do the parsing before matching. . .