× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello, Dave:

If you create the object from the DDS source (e.g. PF, LF or DSPF or PRTF etc.), then the IBM COBOL compilers will do this for you automatically when you compile your program and reference an "externally defined" *FILE. For example, below, I show a snippet of code from a COBOL listing where I have the statement COPY DDS-ALL-FORMATS OF FILEA (on line 19) and you can see the lines immediately below that show the "generated" code, with "<-ALL-FMTS" markers.

18 001800 FD FILEA 19 001900 COPY DDS-ALL-FORMATS OF FILEA. 20 +000001 05 FILEA-RECORD PIC X(50). <-ALL-FMTS
+000002* I-O FORMAT:AR FROM FILE FILEA OF LIBRARY ISS <-ALL-FMTS
+000003* <-ALL-FMTS
21 +000004 05 AR REDEFINES FILEA-RECORD. <-ALL-FMTS
22 +000005 06 AKEY PIC X(10). <-ALL-FMTS
23 +000006 06 ADATA PIC X(40). <-ALL-FMTS

So, if you really needed to convert DDS source to COBOL source, perhaps you could just "cut-and-paste" from the compiler listing? This would be a lot less 'work" than parsing the DDS source. You could even write a program (or command) that would:

1. create the *FILE (in QTEMP) from the DDS source
2. ensure QTEMP is at the top of the *LIBL
3. generate and compile COBOL source with an embedded "COPY DDS-ALL-FORMATS OF " filename
4. read the listing spool file and copy the relevant lines (marked with "<-ALL-FMTS") to a target source member

HTH,

Mark S. Waterbury

> Dave Snyder wrote:
Looking for a way to have a DDS source file definition translated into a
COBOL copybook format. Any ideas?

Dave

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.