Page 1 of 1

Is repointing a problem?

PostPosted: Wed Sep 09, 2009 9:40 am
by anjali_b
Hey All,

This query is pertaining to POINT functionality in Easytrieve.

I had a requirement where i had to read a file based on an account (one part of the key). Of all the records existing for that account in the file, if any one had a schedule as 'Y'; i should dump all the records for the account in an extract.

I have two ways to go about it

1) Set partial key...do a point and read records for account..till a schedule of 'Y' is found; if schedule is 'Y', set dump=Y and then go back to Set partial key and this time dump all records based on dump='Y' flag.


:
Rec1     Account1   N                         
Rec2     Account1   N                                                               
Rec3     Account1   Y ---go back to point and restart from Rec1
:



2) Have two DD's pointing to same file. Process DD1...set partial key, do a point and read records for account..till a schedule= 'Y' is found; if schedule is 'Y', then set a point in DD2 for same account and start dumping records for the account.

DD1                                                                          DD2
:
Account1   N                                                           Account1   N
Account1   N                                                           Account1   N                   
Account1   Y---- do a point in DD2 and dump             Account1   Y
:




Step 1 is what i used but i was suggested to refrain from using it. I have not understood why.
Can some one please suggest which way is better and why?

Thank you,
AB.

Re: Is repointing a problem?

PostPosted: Thu Sep 10, 2009 12:23 am
by dick scherrer
Hello,

but i was suggested to refrain from using it
If someone suggested you refrain, they should be able to explain why. . . :?

The suggestion to use the second process may be to retain positioning info within the Easytrieve process and not need to "start over" . . .