Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help in identifying which COBOL is this 2

Status
Not open for further replies.

tsravihyd

Programmer
Sep 1, 2003
10
US
Hi,
I have got some sample codes of COBOL that I am suppossed to look into... but am not able to find what COBOL or version it is ... it looks like HP3000 ... but not too sure.

Example of Code:

008100 WORKING-STORAGE SECTION.
008200$INCLUDE GLOBALWS.COBINCL.PROD
008300 %GETALLWS(2112#)
008400$INCLUDE DBFLX.COBINCL.PROD
008500$INCLUDE FLXWS.COBINCL.PROD
008600$INCLUDE PFLXWS.COBINCL.PROD
008700$INCLUDE ERRORWS.COBINCL.PROD

If anyone has got a clear idea on this, please let me know, and one more thing is if it is HP3000 Micro Focus cobol, I would like to know on how to identify what is a module and what is a library (those are used in the cobol programs)...

Thanks in advance.
TSR
 
Only line 008100 is COBOL. The other lines are some library system of which I am not familiar.
 
This is likely HP3000 cobol. The $INCLUDE stuff is the preprocessor command to include a file in the source. The %GETALLWS is a macro that must be defined in the file GLOBALWS.COBINCL.PROD.

Regards.

Glenn
 
Hi Everybody,

Thank you very much for the info...

Hi Glenn, your info is really very very helpful... if you are aware ... by chance do you also know what are Modules in such type of COBOL codes ... is it something like a standard code library or ... well I am not too clear on this... if you could help on this too ... it will be more helpful...

Thanks,
TSR
 
TSR -

I'm not sure I understand your question.

Given the naming of the referenced files in your example, I'm assuming ...WS refers to a Working-Storage data definition kept in a source file. ...LX may be Linkage Section data definition.

If your question is about called modules, they are likely in an XL file somewhere (check the :RUN command for the program or look for files of type NMXL in the group that the program executable is stored in.

If you need further help, you can communicate directly with me at g.mitchell <at> computer.org.

Glenn
 
TSR,

On some installations, this type of compiler directives ($INCLUDE, etc...) is used to allow the inclusion of COPY files, or the linking to special routines sometimes written in non-COBOL languages, allowing a COBOL program to CALL &quot;some-code&quot;, without specifying the library containing the &quot;some-code&quot; routine.

In this case, $INCLUDE is used in the WORKING-STORAGE, and as such is only doing what a regular COPY statement will do. Except $INCLUDE may have a special meaning for your COBOL pre-processor.

$INCLUDE ERRORWS.COBINCL.PROD could be COPYing variables used by COBOL error reporting routines (production source?), while %GETALLWS(2112#) could be invoking a special editor to look for data elements whose names begin with &quot;2112&quot;.

The above is only educated guessing. You really need a manual for the system and compiler you are using. As Glenn indicated, take a look at HP3000 COBOL, and look at programmers (technical) documentation for things like %GETALLWS which looks suspiciously like a macro created by the programming staff.

Dimandja
 
Hi Glenn / Dimandja,

Thank you very much for the detailed explanations, I have just downloaded the HP3000 COBOL tech. docs and user manuals and am going thru the same.

Will look for info based on your suggestions and revert soon, thank you guys once again.
TSR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top