hexagon logo

Subroutines - Must I define a variable in the main program?

Is it absolutely necessary to instantiate a variable within the main program before it is called in a subroutine? 

______________________________________________________________________________________

ASSIGN/VAR1=<VALUE>                     <----------------------- IS THIS NECESSARY?

CS1 = CALLSUB/<SUBROUTINE TITLE>,<SUBPROGRAM PATH>:VAR1

***INSIDE SUBROUTINE***

SUBROUTINE/<SUBROUTINE TITLE>,

sVAR1 = <DEFAULT VALUE> : <DESCRIPTION>

ASSIGN/sVAR1=<VALUE> + 1

ENDSUB/

COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,

"VAR1: " + VAR1

Parents Reply Children
No Data