- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- how to DCL custom exit?
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
Discussions
Discussions
Forums
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
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
тАО10-05-2007 03:26 AM
тАО10-05-2007 03:26 AM
Re: how to DCL custom exit?
I used a specific logical name table in order not to clutter my name space.
Cleanup is easy also, but maybe hard to find at first: $DEAS/TABLE=symbol/ALL
For interested readers that did not yet 'see' what I did here...
The SSDEF module and others in STARLET look like:
---------------
.MACRO $SSDEF,$GBL
$DEFINI SS,$GBL
; RIGHT:
$EQU SS$_NORMAL 1
$EQU SS$_CONTINUE 1
:
---------------
Those first 3 lines are strictly for the Macro compiler and DCL does not like them.
But the rest, whilest actually being invocation of MACRO called "$EQU", look like fine DCL statements, if EQU was a command. The $EQU macro in macro translates to:
symbol = value
or
symbol == value
depending on the argument used for $SSDEF [GLOBAL|LOCAL|]
So I defined EQU in DCL as DEFINE and voila!
:-)
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 03:32 AM
тАО10-05-2007 03:32 AM
Re: how to DCL custom exit?
Actually, I was thinking of something a little more sparing of long term system resources.
As I said, I will put something together shortly that is easily usable by everyone.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 05:54 AM
тАО10-05-2007 05:54 AM
Re: how to DCL custom exit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 08:43 AM
тАО10-05-2007 08:43 AM
Re: how to DCL custom exit?
$ @symbol $SSDEF *acl*
SS$_ACLEMPTY = 2512 Hex = 000009D0 Octal = 00000004720
SS$_ACLFULL = 2552 Hex = 000009F8 Octal = 00000004770
SS$_BADACL = 3642 Hex = 00000E3A Octal = 00000007072
SS$_BADACLCTX = 8652 Hex = 000021CC Octal = 00000020714
SS$_IVACL = 8676 Hex = 000021E4 Octal = 00000020744
SS$_NOACLSUPPORT = 8892 Hex = 000022BC Octal = 00000021274
------- symbol.com ------
$IF p2.EQS."" THEN EXIT 16 !-)
$CREATE tmp.mar
$DECK
$ copy sys$input nl:
.MACRO $DEFINI dummy arg more_dummy
.ENDM
.MACRO $DEFEND dummy arg more_dummy
$ show symb arg
.ENDM
.MACRO $EQU nam num
$ nam = num
.ENDM
$EOD
$OPEN/APPEND tmp tmp.mar
$WRITE tmp "''p1' ''p2'"
$CLOSE tmp
$
$MACRO/ALPH/PREP=tmp.com tmp.mar
$@TMP
$DELE tmp.mar.,tmp.com.
-------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 08:57 AM
тАО10-05-2007 08:57 AM
Re: how to DCL custom exit?
Invoke the following incantation...
$ LIBRARY/EXTRACT=SSMSG/OUT=SSMSG.SDI - SYS$LIBRARY:STARLETSD.TLB
$
$ SDL/NOPARSE/LANGUAGE=DCL
$
$ TYPE SSMSG.COM
...
SDL will extract the constant values -- and as DCL doesn't "do" data structures, much of what resides within the SDL Intermediate (SDI) file won't be propagated through -- and establish the DCL constants in an easy-to-include DCL command procedure.
Do use some caution here, as you might blow out and/or need to increase your DCL symbol table size if you are profligate with these "include files"...
Stephen Hoffman
HoffmanLabs LLC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 09:00 AM
тАО10-05-2007 09:00 AM
Re: how to DCL custom exit?
$ LIBRARY/EXTRACT=SSMSG/OUT=SSMSG.SDI - SYS$LIBRARY:STARLETSD.TLB
$
$ SDL/NOPARSE/LANGUAGE=DCL SSMSG.SDI
$
$ TYPE SSMSG.COM
...
The filename on the SDL /NOPARSE was added.
BTW, SDL /NOPARSE starts with and processes the .SDI (intermediate) files. SDL /PARSE starts with and processes .SDL (source) files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 10:35 AM
тАО10-05-2007 10:35 AM
Re: how to DCL custom exit?
There is a lot of material in your replies to digest and choose from. I'm also looking forward to what Robert will put together.
The below is where I'm leaving what I started in the meantime. It works here but suffers from clutter most of which can be avoided by doing the lookup using DCL as you suggest as well as passing the cc value by DCL symbol as you also suggest.
The print bit in the cc is the reason for the rest of the clutter. I noticed from executing abc that the value of the print bit in the cc is sensitive to the way of exit. If the exit is by way of using dcl's exit i.e. "controlled" i.e. "on demand" (I suppose) then the print bit does not get set i.e. the cc does not get changed and/but a message is printed if error - as opposed to when DCL catches an exiting executable. so - to avoid "changing cc's" then always exit only by use of dcl's exit?
I looked for a callable (RTL) function to access *.TLB,*.MLB,*.OLB,*.HLB,...? Are there any?
-------------------
$! abc.com
$ emit:=$srv$exe:emit
$! get condition codes to test for later - siliently and without dying
$! msgflags = f$environment("MESSAGE")
$! set mess/nofac/nosev/noid/notext
$ set noon
$ emit SRV$_BADPARAM
$ status=$status
$ write sys$output "abc.1 ''status'"
$ cc1=f$integer(status)
$ emit SRV$_DEADLOCK
$ status=$status
$ write sys$output "abc.2 ''status'"
$ cc2=f$integer(status)
$ set on
$! set message 'msgflags'
$! execute some procedure also without dying
$ set noon
$ @xyz
$ status=$status
$ write sys$output "abc.3 ''status'"
$ status=status.and.%xfffffff
$ set on
$! now test the procedures exit status symbolically - the purpose of all of this
$ if status .eq. cc1
$ then
$ write sys$output "abc.4 cc1"
$ else if status .eq. cc2
$ then
$ write sys$output "abc.5 cc2"
$ endif
-------------------
$! xyz.com
$! cc print bit does not get set if error handling is disabled
$ set noon
$! mcr srv$exe:emit SRV$_BADPARAM
$ mcr srv$exe:emit SRV$_DEADLOCK
$! emit:=$srv$exe:emit
$! emit SRV$_BADPARAM
$ status=$status
$ write sys$output "xyz.1 ''status'"
$ exit status
-------------------
/* emit.c */
#include
#include
/* usage example: mcr srv$exe:emit SRV$_NORMAL */
int main(int argc,char *argv[])
{
int unsigned SymVal;
char FileName[80+1];
$DESCRIPTOR (dFileName,FileName);
$DESCRIPTOR (dSymName,"");
/* compose (system logical) name of our shareable */
sprintf(FileName,"%3.3sLIB",argv[1]);
dFileName.dsc$a_pointer=FileName;
dFileName.dsc$w_length=strlen(dFileName.dsc$a_pointer);
dSymName.dsc$a_pointer=argv[1];
dSymName.dsc$w_length=strlen(dSymName.dsc$a_pointer);
/* lookup symbol value */
lib$find_image_symbol(&dFileName,&dSymName,&SymVal);
return SymVal;
/* alternatively set symbol - this requires a CLI */
//lib$set_symbol(...);
}
-------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 10:52 AM
тАО10-05-2007 10:52 AM
Re: how to DCL custom exit?
Util routine manual...
Librarian (LBR) Routines
http://h71000.www7.hp.com/doc/83final/4493/4493pro_contents_001.html#toc_chapter_13
But, I dunno Claus... you lost me, and possibly you lost 'it'.
This smacks of overengineering to an extreme.
Just hardcode those defintions in the top of the script.
If you have more than say 5, then make yourself a command file to execute to defined the list of selected symbols.
LIB$FIND_IMAGE_SYMBOL is NOT a light system service. It opens file(s), reads, create memory sections, allocates VM calls LIB$INSERT_tree, for future lookups (which will nto happen in your case) and so on!
Just have DCL read that text file already! KISS!
Best of luck,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 01:05 PM
тАО10-05-2007 01:05 PM
Re: how to DCL custom exit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2007 04:51 AM
тАО10-08-2007 04:51 AM
Re: how to DCL custom exit?
- handling of condition codes symbolically in DCL
- automatic mask out of the control bits in the cc to eliminate comparison mismatches because of the control bits
- a library of messages dedicated to general use to avoid having to borrow codes from other facilities such as SS for use with for example RSH which doesn't return a code. Because if I receive an SS code then I should be able to rely on it originating from the "system" and not some other place out there like my DCL or my program.
Again, thank you for listening.