home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
REX2U10.ZIP
/
DISPATH.CMD
next >
Wrap
OS/2 REXX Batch file
|
1991-07-16
|
1KB
|
43 lines
/* Display Directory path of PATH or DPATH variable */
/* version 1.0 July 15, 1991 */
/* Bob Pound */
arg reqtype
type=gettype(reqtype)
PATH=value(type,,'OS2ENVIRONMENT')
call Displaypath
exit
/* Called Local Procedures */
Displaypath:
sp=1
do until ep>=length(path)
ep=pos(";",path,sp)
/* if path doesn't end with ;, then a 0 value is returned */
if ep=0 then ep=length(path)+1
dir=substr(path,sp,ep-sp)
SAY "DIR:" dir
sp=ep+1
end
return
gettype:
arg reqtype
deftype="PATH"
if reqtype=="" then type=deftype
else do
if reqtype = "PATH" | reqtype = "P" then type="PATH"
else do
if reqtype = "DPATH" | reqtype = "D" then type="DPATH"
else do
say "**The valid parameters for this procedure are:"
say " PATH or P - to display the PATH"
say " DPATH or D - to display the DPATH"
say " If no parameter is entered the default is PATH"
exit
end
end
end
say type "directory listing"
return (type)