Computing.Net > Forums > OpenVMS > Get Number of DCL parameters

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

Reply to Message Icon

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.

Any ideas?



Sponsored Link
Ads by Google

Response Number 1
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.


Topless = no brains at all


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to OpenVMS Forum Home


Sponsored links

Ads by Google


Results for: Get Number of DCL parameters

DCL help www.computing.net/answers/openvms/dcl-help/227.html

OpenVMS parameters in procedures www.computing.net/answers/openvms/openvms-parameters-in-procedures/582.html

Check Disk Space Q www.computing.net/answers/openvms/check-disk-space-q/589.html