An optional new parameter, chainto, may be specified (along with the +4 option in the pflag parameter) to return the command line that the child program attempted to chain to. The CHAIN operation is always trapped by XCALL AMOS, forcing the child to return to the parent; this new feature allows the parent to effectively carry out the requested CHAIN operation via a subsequent XCALL AMOS call. New syntax:
XCALL AMOS, cmd {,qflag {,pflag {,chainto}}}
where chainto is a string of sufficient length to retrieve the CHAIN statement argument. If the +4 option in pflag is not specified, or if the child program does not CHAIN, chainto will return "".
Also note that this is only possible when the child executes in-process, so unless you have that option forced on globally, you should also specify the +1 option in pflag.