cancel
Showing results for 
Search instead for 
Did you mean: 

CDO to COBOL

 
sunny123
Occasional Advisor

CDO to COBOL

Hi,
I have a CDO format record layout. Is there any command to convert this into COBOL record layout format. Attached is the record layout in CDO format. Pls let me know if i have to provide more info
6 REPLIES
Richard J Maher
Trusted Contributor

Re: CDO to COBOL

Have you looked at: -

COPY blah FROM DICTIONARY

If you want to remove your dependence on the CDD you could always do it once with a /LIST/COPY and then create a .lib copybook from that.

Cheers Richard Maher
Chris Barratt
Frequent Advisor

Re: CDO to COBOL

Assuming all you have is this .CDO file:
-----------------------------------------
Looking at the .CDO file attached, you probably need more information - ie. you need to find out the definitions of the fields that the record fields are based on. The types of the fields would be here. Then you would need to read the CDD documentation to see how those types convert to COBOL types.
From this you should be able to piece together the COBOL record structures.

If you have access to the Dictionary:
-------------------------------------
If you have access to the dictionary that this comes from, then I would have thought there would be a way in COBOL to refer to the dictionary definition from a program. I don't use COBOL, but in PASCAL you can use %DICTIONARY 'dict_locn:my_record' and it will create a data type in pascal based on the dictionary defintion. You can see how it translates the defintion by looking at the programs listing file.

Cheers,
Chris
Phil.Howell
Honored Contributor

Re: CDO to COBOL

sunny123
Occasional Advisor

Re: CDO to COBOL

HI All,

Thanks for you reply. I looked at some of the existing programs to see how they are invoking and created a listing file but getting an error saying that unable to copy

I found the below command in many of teh programs and created a listing file to find out the record layout
COPY "CDD_REC.TBLMSTR_MASTER" FROM DICTIONARY
this is the logical i have for cdd_rec
sh log cdd_rec
"CDD_REC" = "HNCORP_CDD:RECORDS"


below is the error message

COPY "CDD_REC.TBLMSTR_MASTER" FROM DICTIONARY.
.....1
%COBOL-F-CDDERROR, (1) *CDD error at node CDD_REC.TBLMSTR_MASTER

%COBOL-F-COPYOPEN, (1) Error opening COPY file CDD_REC.TBLMSTR_MASTER
sunny123
Occasional Advisor

Re: CDO to COBOL

Sorry, i figured out the problem. I tried teh same on the other node on the same cluster which has VMS V7.3-2 and now iam able to get it. Thank you. Not sure why was this not working on VMS V8.3

Thank you all for your help.
Willem Grooters
Honored Contributor

Re: CDO to COBOL

AFAIK, CDD is a separate product (once Digital, now Oracle) that needs to be installed, on top of a RdB database (once Digital, now Oracle). It may not have been installed on the 8.3 machine, or references (= logicals) are missing or misconfigured.
Willem Grooters
OpenVMS Developer & System Manager