home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!walter!att!ucbvax!ko.hhs.dk!ARNE
- From: ARNE@ko.hhs.dk (Arne Vajhxj)
- Newsgroups: comp.os.vms
- Subject: Re: Command string from within VAX/VMS Pascal ???
- Message-ID: <052DCE714ABFC0C81E@sb.hhs.dk>
- Date: 26 Aug 92 12:13:00 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Organization: The Internet
- Lines: 41
-
- Someone, which did not supply an email-address, asked:
-
- > Could somebody tell me how to retrieve the command string
- > from within VAX/VMS Pascal, including the path,program name
- > and on-line parameters ?
-
- Look for LIB$GETJPI and LIB$GET_FOREIGN !
-
- Small example:
-
- [inherit('sys$library:pascal$lib_routines','sys$library:starlet')]
-
- program z(input,output);
-
- var
- img,cmd : varying [512] of char;
-
- begin
- lib$getjpi(item_code:=JPI$_IMAGNAME,
- resultant_string:=img.body,resultant_length:=img.length);
- lib$get_foreign(resultant_string:=cmd.body,resultant_length:=cmd.length);
- writeln('Image = ',img);
- writeln('Command line = ',cmd);
- end.
-
- To test try:
-
- PAS Z
- LIN Z
- Z:==$disk:[dir]Z
- Z "kuk"
-
- Hope it helps !
-
- Arne
-
- Arne Vajhxj local DECNET: KO::ARNE
- Computer Department PSI: PSI%23831001304030::ARNE
- Business School of Southern Denmark Internet: ARNE@KO.HHS.DK
-
-
-