View previous topic :: View next topic
|
Author |
Message |
cvasu03
New User
Joined: 23 Mar 2007 Posts: 9 Location: USA
|
|
|
|
Is reference modification possible in Easytrieve? If possible please let me know how?
Thanks,
Vas |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Not the same way cobol provides.
To displace/modify use something like:
DATE-OF-HIRE 136 6 N
HIRE-MM DATE-OF-HIRE 2 N
HIRE-DD DATE-OF-HIRE +2 2 N
HIRE-YY DATE-OF-HIRE +4 2 N
If you describe what you want to accomplish, someone may have suggestions. |
|
Back to top |
|
|
cvasu03
New User
Joined: 23 Mar 2007 Posts: 9 Location: USA
|
|
|
|
Thank you. My requirement is I am reading input file which is 80 byte long.
the key is first 5 bytes. I have two records with the same key.
I want to move the remaining 75 bytes data into another working storage field which is 150 bytes long.
Read two records from input file and populate the working storage field.
i.e. 75 + 75 = 150
Earlier I use to this kind of thing using reference modification in cobol. Now I want do this in Easytrieve.
Please help.
Thanks,
Vasu |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you change the names & lengths on the example i used, you can have your working storage field with 2 "sub-fields" of 75 each - just make sure the second field has the +75 displacement.
If you are more comfortable with cobol terminology, think of it as a "redefines" of a larger field - like the date example above. |
|
Back to top |
|
|
cvasu03
New User
Joined: 23 Mar 2007 Posts: 9 Location: USA
|
|
|
|
thank you |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
|