Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Get Number of DCL parameters
Name: jcagle Date: March 28, 2005 at 11:31:36 Pacific OS: OpenVMS CPU/Ram: Unknown
Comment:
Is there a way to get the number of parameters that are being passed into a DCL COM file? My problem is that I want "" to show up as a parameter if it is on the command line. So, I can't simply loop through P1-P8 to count the non-blanks.
Name: jcagle Date: March 28, 2005 at 13:44:33 Pacific
Reply:
I wanted to narrow this down more...to exactly what it is I'm trying to do.
Let's say I have this: $ @DOIT "HELLO" "GOODBYE" ""
I want to be able to determine that there were 3 arguments supplied. The problem I'm having is that I don't know how to distiguish between "" and an argument that isn't there at all. In other words, P3 and P4 are both interpreted as not being there. Any ideas on how to determine that P3 is there but P4 is not?
Thanks in advance!!!!
0
Response Number 2
Name: Tofket Date: March 31, 2005 at 05:26:34 Pacific
Reply:
I solved a similar problem by using dummy values (like a ".") to distinguish between missing and null parameters.
A Pn parameter reading "." would then be interpreted as <null>, where a "" would mean <missing>.
The idea was to later develop some code (using LIB$GET_FOREIGN and some CLI$ routines) but finally I kept the work-around in pure DCL. Never had problems with it.
Summary: Hi, I am new to VMS's DCL and want to know if the following is possible.I am running a model that takes various input files and produces a number of output files. I want to write a .COM file that rena...
Summary: Hi Kelly, Thanks for the tip, but I think there's something missing... on the VMS prompt I do: uid="xdt001" pwd="123456" @check_password uid pwd Afther this an error message is returned: %DCL...
Summary: dir/size/gran_total gives You what it says: the total number of files and space used by all files. if the disk has alias directories and files, then those aliases are also added, i.e. the sum may be h...