Just FWIW, the COMMAND and HPCICOMMAND intrinsics are NM code. COMMAND does not look for UDCs or scripts when resolving the command image. HPCICOMMAND does search for UDCs and scripts/auto-run programs when resolving the command name passed in. HPCICOMMAND also support writing error/warning messages to $stdlist. Both can execute the RUN and XEQ commands.
The HPPATH variable is job/session global, meaning that if you change it by calling HPCIPUTVAR that value remains in place after the program exits. I think the best bet may be to change all of the programs to pass to COMMAND something like this:
"xeq fully-qualified-filename parameters". This way you are not dependent on HPPATH.
A quicker method could be to set HPPATH in the JCL which runs your main program.
HTH,
Jeff Vance, vCSY
> -----Original Message-----
> From: HP-3000 Systems Discussion
> [mailto:[log in to unmask]] On Behalf Of Francois Desrochers
> Sent: Wednesday, April 11, 2007 12:14 PM
> To: [log in to unmask]
> Subject: Re: [HP3000-L] Calling Intrinsic Command from Cobol
>
> Gordon,
>
> I believe the COMMAND intrinsic is CM which may not
> follow/use HPPATH. Try changing it to HPCICOMMAND.
>
> Thanks....François
>
> -----Original Message-----
> From: HP-3000 Systems Discussion
> [mailto:[log in to unmask]] On Behalf Of Gordon Montgomery
> Sent: Wednesday, April 11, 2007 2:06 PM
> To: [log in to unmask]
> Subject: [HP3000-L] Calling Intrinsic Command from Cobol
>
> Is there a way to specify the HPPath variable to be used when
> you use Call Intrinsic "COMMAND" from within cobol? When the session
> logs on, a logon UDC is run that sets the HPPATH variable. We
> use menu programs to only offer the users access to the few real
> programs they need, and call the programs with the intrinsic
> call. The call fails, but if you type the name at the command prompt,
> it works. I know that we can specify the full path in the
> call, but we were hoping for a quick and easy solution rather
> than having
> to find and replace all the calls with the full path. Now
> that I see this in writing, I can see that either way we will have to
> recompile all the menu programs, but I will still ask the
> question just for kicks.
>
> Thanks,
>
> Gordon Montgomery
> Living Scriptures, Inc.
> (801) 627-2000
> [log in to unmask]
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
> Remarque - Cette transmission est pour l'usage exclusif du ou
> des destinataires indiqués et peut contenir de l'information
> confidentielle ou protégée. Si vous n'êtes pas le
> destinataire indiqué, veuillez supprimer cette transmission
> ainsi que tout fichier joint et aviser l'expéditeur par
> courriel immédiatement. Toute révision, utilisation,
> divulgation ou distribution non autorisée est interdite.
>
>
> Notice: This transmission is for the sole use of the intended
> recipient(s) and may contain information that is confidential
> and/or privileged. If you are not the intended recipient,
> please delete this transmission and any attachments and
> notify the sender by return email immediately. Any
> unauthorized review, use, disclosure or distribution is prohibited.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|