× 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.



Hi Kelly,

You can read the source code right from the source physical file. The format
of the source record looks like this:

       01            INPRCDD.
           05        INPSEQ             PIC  9(04)V9(02).
           05        INPDATE            PIC  9(06).
           05        INPDATA            PIC  X(80).

INPSEQ is the sequence number, INPDATE is the change date, and INPDATA is
the actual source code.

To access a specific member in your analysis program, you need to do an
OVRDBF first. I usually have a CL program do the OVRDBF and then call my
analysis program, although I've also used QCMDEXC within my analysis program
to do the OVRDBF command internally. The OVRDBF command would look like:

        OVRDBF FILE(infile) TOFILE(sourcelibrary/sourcefile) MBR(member)

infile is the name of the file reference in your analysis program,
sourcelibrary/sourcefile is the name of the source physical file, and member
is the name of the member you want to process.

Hope this helps!
Richard Casey



-----Original Message-----
From: cobol400-l-admin@midrange.com
[mailto:cobol400-l-admin@midrange.com]On Behalf Of Kelly Cookson
Sent: Thursday, March 21, 2002 8:35 AM
To: cobol400-l@midrange.com
Subject: reading source code


Hi.

I would like to try my hand at developing some
programs to analyze COBOL-400 source code. We store
the source code for each COBOL program as a member in
a source physical file.

What would be the best way for me to access the source
code for analysis?  Is there any way to READ a member
in a source physical file?  Is there any way to save a
member as a data physical file (e.g., a flat file with
one line of source code being one record)?

I'd appreciate any ideas.

Thanks,

Kelly Cookson



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.