skip to main content

Library Routines : C$CALLEDBY

C$CALLEDBY
The C$CALLEDBY library routine returns the name of the program that has called the currently running program.
If the calling program does not exist or is not known, then spaces are returned. Spaces are returned also if the currently running program was called through the iscobol.remote.code_prefix.
Syntax:
 CALL "C$CALLEDBY" USING  callingProgram
Parameters:
Return code:
returnCode can be any signed numeric data item and provides additional information:
Examples:
Example - Display what program called the current one in the beginning of the program
working-storage section.
77 calling-prg  pic x(256). 
procedure division.
  call "c$calledby" using calling-prg
  if calling-prg = spaces
     display message "No program called me"
  else
     display message "I was called by program : " calling-prg
  end-if.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left