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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: CALL parameter not supplied

Status
Not open for further replies.

aknoth

Programmer
May 11, 2005
2
CA
Hi! I'm new to cobol programming. What I was asked to do is to create 2 programs to manage some files. Program "A" is calling Program "B" using CALL "ProgramB" USING Param1 Param2. Everything is working well if I do this. My problem is that I must be able to run Program "B" as a "stand alone" program (user must be able to call it from the shell without passing any parameters to it). When I try to execute this program, I get this error: 203 CALL parameter not supplied.

What I want to do in Program "B" is to check if some arguments where "passed" to the program or not. Here's an example of what I tried:

IDENTIFICATION DIVISION.
PROGRAM-ID PROGRAM-B.
...

LINKAGE SECTION.
01 PARAM1 PIC 9(03).
01 PARAM2 PIC S9(01).
...

PROCEDURE DIVISION USING PARAM1 PARAM2

1000-MAIN SECTION.

1000-START.

* initialize the variables?
IF PARAM1 = LOW-VALUES OR HIGH-VALUES
MOVE ZERO TO PARAM1
END-IF

IF PARAM2 = LOW-VALUES OR HIGH-VALUES
MOVE ZERO TO PARAM2
END-IF

* check if program was called or executed as stand alone
IF PARAM1 NOT ZERO
...
ELSE
...
END-IF.

Any idea on why I get this error? I want to set PARAM1 to 0 if the program isn't called from another program or use param1 and param2 value in my program if it was called by another one. Thanks for your help (and reading this all ;-) )
 
Something like this ?
IF ADDRESS OF PARAM1 = NULL
MOVE ZERO TO WS-PARAM1
ELSE
MOVE PARAM1 TO WS-PARAM1
END-IF

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
YES! Thanks a lot I really apreciate! Have a nice day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top