Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: Get Number of DCL parameters

Original Message
Name: jcagle
Date: March 28, 2005 at 11:31:36 Pacific
Subject: Get Number of DCL parameters
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?


Report Offensive Message For Removal

Response Number 1
Name: jcagle
Date: March 28, 2005 at 13:44:33 Pacific
Subject: Get Number of DCL parameters
Reply: (edit)
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!!!!


Report Offensive Follow Up For Removal

Response Number 2
Name: Tofket
Date: March 31, 2005 at 05:26:34 Pacific
Subject: Get Number of DCL parameters
Reply: (edit)
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


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Get Number of DCL parameters

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC