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



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

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

Postby manojlives » Thu Jul 02, 2009 7:46 am

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
manojlives
 
Posts: 37
Joined: Wed Dec 24, 2008 5:15 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Thu Jul 02, 2009 8:30 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post