Download 47 A2 90US REV01 - Support On Line

Transcript
NatStar on GCOS 7
; Note that the variable names passed in the CALL statement
; have been derived as described in Table 5-5.
%
MOVE I-EMPLOYEE-ID TO EMP-NO.
CALL "FIND-EMPLOYEE" USING I-EMPLOYEE-ID,
SZ-EMPLOYEE-NAME,
R-SALARY,
I-RETURN-CODE.
%
; End of inclusion of native COBOL-85 Call User Subroutine
; source
;
;
;
;
;
;
If an Employee has been found, move the value in variable
EMPLOYEE_NAME$ to the PASS_EMP_NAME output parameter
and the value in variable SALARY# to the PASS_EMP_SALARY
output parameter. Return a value of 0 from the function.
If no Employee has been found, return a value of 1 from
the function.
IF RETURN_CODE% = 0
MOVE EMPLOYEE_NAME$ TO PASS_EMP_NAME
MOVE SALARY# TO PASS_EMP_SALARY
RETURN (0)
ELSE
RETURN (1)
ENDIF
❑
Native code entered in an NCL program is copied verbatim, minus the beginning
and ending % (as shown in the preceding example), into the output source code
when the NCL program is processed by the NatStar code generator.
5.3.5
Calling A Conventional Subroutine
This section explains how to call a conventional subroutine from a NatStar TPR.
Conventional subroutines do not use NatStar Communication Services (NSCOM7)
and typically are developed using conventional methods (e.g., by programming in
COBOL-85).
1
3
3
IMPORTANT:
When you call a conventional subroutine from a NatStar TPR, you need to be
concerned about data-type incompatibilities. Refer to Section 5-47 Handling
Data-Type Incompatibilities earlier in this chapter.
5-58
47 A2 90US Rev01