COBOL External Routines

COBOL External Routines


2024年4月25日发(作者:windows7家庭版和旗舰版区别)

COBOL External Routines

COBOL can call external programs written in any language that follows

standard linkage conventions. The external programs DO NOT have to be

compiled within the same JOB as the COBOL calling program.

The LINKAGE EDITOR will link the calling program with the called program.

To call an external program, the CALL statement will be used.

Static Calling Format: CALL 'pgm_name' USING PARM1 PARM2.

- pgm_name is linked into the load module of the calling program

during the linkage editor step

pgm_name this is the name of the program that is being called

maximum of 8 characters

COBOL: this is a PROGRAM-ID

ASSEMBLER: this is a CSECT name

USING this signals that a parameter list will follow

PARM1 PARM2.. these are the parameters that are being passed

to the external program

Dynamic Calling Format: MOVE 'pgm-name' to ws-field.

CALL ws-field USING PARM1 PARM2.

- ws-field is a field in WORKING-STORAGE that has the external

program name moved to it prior to calling the external program

- pgm_name is linked into the load module of the calling program

at run time

- pgm_name must be a member of STEPLIB

Calling Program:

Does not know the language that the external program is written in.


发布者:admin,转转请注明出处:http://www.yc00.com/xitong/1714048695a2370775.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信