Hi,
I have got a requirement in which I need to do a reference modification for a record in my output file.
For ex:
Variable1 - PIC X(30).
If Condn-1
Move 123 to Variable1(1:5)
Move 876 to Variable1(7:3)
...
...
...
End-if
Can I do this in an easytrieve program?
If so, please let me know the syntax.
Thanks,
Bhaskar
Reference Modification in Easytrieve
Moderators: DikDude, Moderator Group
-
- Member
- Posts: 16
- Joined: Mon Jul 06, 2009 5:25 pm
Hi Bhaskar,
I think, direct reference modification is not possible in Easytrieve as in Cobol.
You need to follow the approach mentioned below
Declare some working storage variable
ws-variable1 W 30 A
ws-v1 ws-variable1 5 A
ws-v2 ws-variable1 +7 3 A (+7 indicates ws-v2 starts at 7 position and is of 3 bytes)
..
.. .
...
then use ws-v1,ws-v2 according to your requirement, like
ws-v1 = 123
and then
You can move the ws-variable to variable. as
variable1 = ws-variable1
Please correct me if iam wrong.
Thanks,
Chanti.
I think, direct reference modification is not possible in Easytrieve as in Cobol.
You need to follow the approach mentioned below
Declare some working storage variable
ws-variable1 W 30 A
ws-v1 ws-variable1 5 A
ws-v2 ws-variable1 +7 3 A (+7 indicates ws-v2 starts at 7 position and is of 3 bytes)
..
.. .
...
then use ws-v1,ws-v2 according to your requirement, like
ws-v1 = 123
and then
You can move the ws-variable to variable. as
variable1 = ws-variable1
Please correct me if iam wrong.
Thanks,
Chanti.
-
- Member
- Posts: 16
- Joined: Mon Jul 06, 2009 5:25 pm
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page