PROCESS NOMONOPRC.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Numeric-Value-1 PIC S9(9) BINARY VALUE 10.
01 Numeric-Value-2 PIC S9(9) BINARY VALUE 13.
01 Answer PIC S9(9) BINARY.
PROCEDURE DIVISION.
MAIN-LINE.
CALL PROCEDURE "SgnMax" USING
BY CONTENT Numeric-Value-1,
BY CONTENT Numeric-Value-2,
GIVING Answer.
DISPLAY "The larger number is: " Answer.
STOP RUN.
PROCESS NOMONOPRC.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
LINKAGE TYPE PROCEDURE FOR "SgnMax".
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Numeric-Value-1 PIC S9(9) BINARY VALUE 10.
01 Numeric-Value-2 PIC S9(9) BINARY VALUE 13.
01 Answer PIC S9(9) BINARY.
PROCEDURE DIVISION.
MAIN-LINE.
CALL "SgnMax" USING BY CONTENT Numeric-Value-1,
BY CONTENT Numeric-Value-2,
GIVING Answer.
DISPLAY "The larger number is: " Answer.
STOP RUN.
Looking for relevant DataCenter Whitepapers? Visit the SearchDataCenter.com Research Library.
RPGPGM | Jan 30 2008 3:58AM GMT
Thanks for the reply. Its very clear… I will try to implement it and get back if any queries.
RPGPGM | Jan 31 2008 10:31PM GMT
I used both the formats… Call Procedure and Call Linkage Type but it throws me an Error…”Program-name in CALL or CANCEL statement is not valid”. Can you say what could be the mistake?
Bvining | Feb 1 2008 4:35PM GMT
Please provide the source code that’s causing the problem. It will be much easier to debug if I can see what you’re doing. The equivalent working RPG CALL would also be great.
Bvining | Feb 1 2008 5:53PM GMT
And just in case, is the error at compile time or is this an editor (like SEU) reported error?