- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: CLI$ROUTINES.H
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 07:04 PM
08-01-2005 07:04 PM
CLI$ROUTINES.H
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 07:21 PM
08-01-2005 07:21 PM
Re: CLI$ROUTINES.H
if you do
$ SEARCH SYS$EXAMPLES:*.C CLI$
you will see there are three sample programs that
use the CLI routines. These may help.
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 07:21 PM
08-01-2005 07:21 PM
Re: CLI$ROUTINES.H
ACMEUTIL.C
GCU$BALANCER.C
(Besides HELP and the online documentation, SYS$EXAMPLES is a perfect source for examples (hence the name ;-)). Great part: All are buildable and run when compiled and linked according the documentation)
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 07:24 PM
08-01-2005 07:24 PM
Re: CLI$ROUTINES.H
Have a look at the CLI$PRESENT function. These coupled with a .CLD definition allow very easy to implement CLI.
I've attached a Pascal snipped which may help.
cheers
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 07:33 PM
08-01-2005 07:33 PM
Re: CLI$ROUTINES.H
******************************
SYS$COMMON:[SYSHLP.EXAMPLES]DISKMOUNT.C;1
unsigned int spawn_flag = CLI$M_NOWAIT;
RE5::[VMSUSER] >
Not sure what it means.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 07:39 PM
08-01-2005 07:39 PM
Re: CLI$ROUTINES.H
unsigned int spawn_flag = CLI$M_NOWAIT
is a flag for LIB$SPAWN to allow the subprocess to run in parallel rather than wait for it to complete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 08:03 PM
08-01-2005 08:03 PM
Re: CLI$ROUTINES.H
Is that the entire output of the search command?
What version of VMS do you have?
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 08:36 PM
08-01-2005 08:36 PM
Re: CLI$ROUTINES.H
$ HELP CLI is your friend.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 08:39 PM
08-01-2005 08:39 PM
Re: CLI$ROUTINES.H
yes, that was all i got after the search command.
version - DEC C V5.6-003 on OpenVMS VAX V6.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 08:43 PM
08-01-2005 08:43 PM
Re: CLI$ROUTINES.H
>HELP CLI
sorry no documentation on CLI.
Could you pl give me complete path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 09:08 PM
08-01-2005 09:08 PM
Re: CLI$ROUTINES.H
if all else fails, read the FM ;-)
http://h71000.www7.hp.com/doc/731FINAL/4493/4493pro_003.html#8_exampleofusingthecliroutine
cu,
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 09:15 PM
08-01-2005 09:15 PM
Re: CLI$ROUTINES.H
VAX/VMS V6.2 & DEC C V5.7 (the versions you have) do not bring SYS$SHARE:SYS$STARLET_C.TLB (at least AFAIK).
I suggest upgrading the VAX to VMS version 7.3 and DEC C V6.4 (the latest for VAX/VMS), then you'll have all the declarations of the VMS specific routines like CLI$, LIB$, etc. siting in SYS$SHARE:SYS$STARLET_C.TLB.
I attach the CLI$ROUTINES.H file for you.
Regards,
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 09:53 PM
08-01-2005 09:53 PM
Re: CLI$ROUTINES.H
Does it imply that if i try to run an example for CLI it would fail since my version does not support CLI library?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 10:09 PM
08-01-2005 10:09 PM
Re: CLI$ROUTINES.H
Does it imply that if i try to run an example for CLI it would fail since my version does not support CLI library?
Not at all. The CLI$ routines are present in the OS. What I meant was that the text library SYS$SHARE:SYS$STARLET_C.TLB is probably not present on your system.
Older versions of the C compiler did not bring that file along. DEC C V6.4 does.
Regards,
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 11:20 PM
08-01-2005 11:20 PM
Re: CLI$ROUTINES.H
int status = 0;
const char* label = "input";
struct dsc$descriptor_s* entity;
entity->dsc$b_class = DSC$K_CLASS_S;
entity->dsc$b_dtype = DSC$K_DTYPE_T;
entity->dsc$w_length = strlen(label);
entity->dsc$a_pointer = label ;
status = CLI$PRESENT(entity);
what would be the value of 'status' after the CLI$PRESENT(entity) command is executed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 11:50 PM
08-01-2005 11:50 PM
Re: CLI$ROUTINES.H
Could get
CLI$_PRESENT = 261401
if 'input' was present,or
CLI$_ABSENT = 229872
if it wasn't there. Standard VMS error checks apply :) Gets more complex when looking for negated qualifiers though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 12:13 AM
08-02-2005 12:13 AM
Re: CLI$ROUTINES.H
CLI$_PRESENT and CLI$_DEFAULTED. What could be the reason for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 12:29 AM
08-02-2005 12:29 AM
Re: CLI$ROUTINES.H
i.e. in uppercase
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 12:30 AM
08-02-2005 12:30 AM
Re: CLI$ROUTINES.H
Have you tried (from DCL) just entering
$exit
and see what comes out? This may prove helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 03:08 AM
08-02-2005 03:08 AM
Re: CLI$ROUTINES.H
#include
/* I guess this is already declared *
#include
/* Set initial status */
int status = SS$_NORNAL;
/* Declare & allocate descripted var */
$DESCRIPTOR (entity, "input");
const char* label = "input";
struct dsc$descriptor_s* entity;
status = CLI$PRESENT(entity);
if (status == CLI$_PRESENT)
{
printf ("Entity present in command\n");
}
else if (status == CLI$_NEGATED)
{
printf ("Entity negated like /NOENTITY\n");
}
else if (status == CLI$_LOCPRES)
{
printf ("Entity present as local qual.\n");
}
else if (status == CLI$_LOCNEG)
{
printf ("Entity negated in loc.qualf.\n");
}
else if (status == CLI$_DEFAULTED)
{
printf ("Default value for entity\n");
}
else if (status == CLI$_ABSENT)
{
printf ("Entity not presenet\n");
}
else
{
printf ("Uhu, wrong software :-?\n");
}
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 03:30 PM
08-02-2005 03:30 PM
Re: CLI$ROUTINES.H
I'd recommend for C programs you use the standard argv & argc mechanisms, rather than the CLI routines. CLI is for implementing DCL style commands. They're very good for building a complex command syntax, but if all you want to do is read a few arguments, they're major overkill.
argv and argc work exactly the same way they do on any other Unix implementation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 06:45 PM
08-02-2005 06:45 PM
Re: CLI$ROUTINES.H
#include
#include
#include/* Starlet (SYS$...) */
#include/* CLI function definitions */
#include/* CLI status codes */
#include/* CLI message definitions */
#include/* Lib routines (LIB$...) */
/* Set initial status */
int status = 1;
/* Declare & allocate descripted var */
const char* label = "input";
struct dsc$descriptor_s* entity;
void main(int argc, char *argv[])
{
$DESCRIPTOR (entity, "input");
status = CLI$PRESENT(entity);
if (status == CLI$_PRESENT){
printf ("Entity present in command\n");
}
else if (status == CLI$_NEGATED){
printf ("Entity negated like /NOENTITY\n");
}
else if (status == CLI$_LOCPRES){
printf ("Entity present as local qual.\n");
}
else if (status == CLI$_LOCNEG){
printf ("Entity negated in loc.qualf.\n");
}
else if (status == CLI$_DEFAULTED){
printf ("Default value for entity\n");
}
else if (status == CLI$_ABSENT){
printf ("Entity not presenet\n");
}
else{
printf ("Uhu, wrong software :-?\n");
}
}
I get an error -
%SYSTEM-F-ACCVIO, access violation, reason mask=01, virtual address=010E0009,
PC=0001B78D, PSL=03C00020
break on unhandled exception at SHARE$LIBRTL+106893
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 07:10 PM
08-02-2005 07:10 PM
Re: CLI$ROUTINES.H
you need to pass the argument to CLI$PRESENT by descriptor, e.g.
status = CLI$PRESENT(&entity);
works for me...
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 07:12 PM
08-02-2005 07:12 PM
Re: CLI$ROUTINES.H
using $DESCRIPTOR macro, cc compiler is not able to recognize entity as structure so you must explicit declare by reference.
$DESCRIPTOR (entity, "input");
/* Look at & symbol */
status = CLI$PRESENT(&entity);
Reading HELP CLI documentation I found a new condition:
else if (status == CLI$_INVREQTYP)
{
printf ("Entity not presenet\n");
}
HTH
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 07:26 PM
08-02-2005 07:26 PM
Re: CLI$ROUTINES.H
Here are 2 observations -
1 - Using 'else if (status == CLI$_INVREQTYP)' i get a message 'Uhu, wrong software :-?'
2 - Using 'else if (status == CLI$_ABSENT)' i get a message 'Entity not presenet'
what is the output you ppl get?