Easytrieve pgm to copy string from previous record



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

Easytrieve pgm to copy string from previous record

Postby srinivasa gunja » Wed Jul 30, 2014 5:09 pm

Hi everyone,

Can someone help me in writing a easytrieve pgm for copying the string to current record from previous records in the same position(if that position is null/spaces)
Or we can do it by sort utility
Input(seq no. (1,1)):

1 add1
1
2 add2
3 add3
4 add4
4


Output should look like this

1 add1
1 add1
2 add2
3 add3
4 add4
4 add4

Thanks in advance!

Srinivas
srinivasa gunja
 
Posts: 2
Joined: Wed Jul 30, 2014 4:55 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Easytrieve pgm to copy string from previous record

Postby BillyBoyo » Wed Jul 30, 2014 5:15 pm

In Easytrieve Plus you define a "working storage" field, save the value from the first record, and use that value to populate the field in the required record once it has been read.

You can do the equivalent with SORT by using IFTHEN=WHEN=GROUP and PUSHing the value to a temporary extension to the record. When you have the second record, populate the field from the temporary extension, and return the record to its original size.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Easytrieve pgm to copy string from previous record

Postby srinivasa gunja » Wed Jul 30, 2014 5:42 pm

Thanks BillyBoyo...

If possible can you please elobarate.
srinivasa gunja
 
Posts: 2
Joined: Wed Jul 30, 2014 4:55 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post