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条)