Fetching RDW of a VB file in Easytrieve
Moderators: DikDude, Moderator Group
-
- Member
- Posts: 3
- Joined: Sat Apr 20, 2013 1:05 pm
Fetching RDW of a VB file in Easytrieve
How can we read/fetch a RDW of a VB file used in Easytrieve. I just want to fetch the rdw of input vb file and pass to the output vb file.
Jacky
-
- Member
- Posts: 3
- Joined: Sat Apr 20, 2013 1:05 pm
Hi Nic,
In cobol, we declare the vb file like below,
RECORD IS VARYING FROM 1 TO 400
DEPENDING ON INPUT-COUNT.
Here, the rdw value stores in the variable INPUT-COUNT. We can pass the rdw of the input file to the rdw of output file (OUTPUT-COUNT) while writing to the output.So that the rdw of both the files remains same. Like how, i want to pass the rdw of the input file to the output file while writing.
In cobol, we declare the vb file like below,
RECORD IS VARYING FROM 1 TO 400
DEPENDING ON INPUT-COUNT.
Here, the rdw value stores in the variable INPUT-COUNT. We can pass the rdw of the input file to the rdw of output file (OUTPUT-COUNT) while writing to the output.So that the rdw of both the files remains same. Like how, i want to pass the rdw of the input file to the output file while writing.
Jacky
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
No, that is not the RDW. When you read your record in Cobol, if you ask it to, as you have shown coded, you get the length of the data.
The RDW is separate from the data. The first two bytes of the RDW shows the record-length of the current record which includes the length of the RDW.
In Easytrieve Plus you cannot access the RDW. However, there is a special variable, RECORD-LENGTH, which exists. It can be "qualified" by FILE-NAME to distinguish one RECORD-LENGTH or another.
What do you want to do with the RECORD-LENGTH?
The RDW is separate from the data. The first two bytes of the RDW shows the record-length of the current record which includes the length of the RDW.
In Easytrieve Plus you cannot access the RDW. However, there is a special variable, RECORD-LENGTH, which exists. It can be "qualified" by FILE-NAME to distinguish one RECORD-LENGTH or another.
What do you want to do with the RECORD-LENGTH?
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Maybe
However, there's no need.
takes account of the RECORD-LENGTH of filename automatically.
There are other things which can be done using the RECORD-LENGTH, just wondered whether something unnecessary was being considered. Or something I've not thought of
However, there's no need.
Code: Select all
MOVE filename TO ....
There are other things which can be done using the RECORD-LENGTH, just wondered whether something unnecessary was being considered. Or something I've not thought of
-
- Member
- Posts: 3
- Joined: Sat Apr 20, 2013 1:05 pm
Length of variable field
Is there a way to determine the length of a variable field in easytrieve which is similar to RECORD:LENGTH that tells us the length of the record?
Sprout
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
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