- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- VAX PASCAL
Operating System - OpenVMS
1752577
Members
4875
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО11-23-2005 11:04 PM
тАО11-23-2005 11:04 PM
VAX PASCAL
Hello,
Can some one give me an idea on how to insert a simple DCL script within a VAX pascal porgram. I want to execute a script A.COM when the program actually starts up.
Can some one give me an idea on how to insert a simple DCL script within a VAX pascal porgram. I want to execute a script A.COM when the program actually starts up.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-2005 11:35 PM
тАО11-23-2005 11:35 PM
Re: VAX PASCAL
LIB$SPAWN ( Command_string := '$ @test.com' , flags := CLI$M_NOWAIT )
Wim
Wim
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-24-2005 07:41 AM
тАО11-24-2005 07:41 AM
Re: VAX PASCAL
Sunil,
You're sure you want to execute the script from inside the program? It may be better to execute it first:
$ @A.COM
$ RUN MY_PASCAL_PROGRAM
You should also investigate what your procedure is doing to see if it might be better implemented in Pascal, calling system services or library routines.
Executing a procedure from within the program will require either a SPAWNed subprocess (LIB$SPAWN) or chaining (LIB$DO_COMMAND). Note that DO_COMMAND terminates the running program.
LIB$SPAWN can either be synchronous (ie: your program waits for the subprocess to terminate before proceeding), or asynchronous. Wim's suggestion "flags := CLI$M_NOWAIT" makes it asynchronous.
To use either routine, you should inherit the LIB$ module:
[INHERIT ('SYS$SHARE:PASCAL$LIB_ROUTINES')]
See: HP OpenVMS RTL Library (LIB$) Manual for details.
http://h71000.www7.hp.com/doc/82final/5932/5932PRO.HTML
To see the Pascal definition:
$ SEARCH SYS$SHARE:PASCAL$LIB_ROUTINES.LIS LIB$SPAWN /WINDOW=30
You're sure you want to execute the script from inside the program? It may be better to execute it first:
$ @A.COM
$ RUN MY_PASCAL_PROGRAM
You should also investigate what your procedure is doing to see if it might be better implemented in Pascal, calling system services or library routines.
Executing a procedure from within the program will require either a SPAWNed subprocess (LIB$SPAWN) or chaining (LIB$DO_COMMAND). Note that DO_COMMAND terminates the running program.
LIB$SPAWN can either be synchronous (ie: your program waits for the subprocess to terminate before proceeding), or asynchronous. Wim's suggestion "flags := CLI$M_NOWAIT" makes it asynchronous.
To use either routine, you should inherit the LIB$ module:
[INHERIT ('SYS$SHARE:PASCAL$LIB_ROUTINES')]
See: HP OpenVMS RTL Library (LIB$) Manual for details.
http://h71000.www7.hp.com/doc/82final/5932/5932PRO.HTML
To see the Pascal definition:
$ SEARCH SYS$SHARE:PASCAL$LIB_ROUTINES.LIS LIB$SPAWN /WINDOW=30
A crucible of informative mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-24-2005 09:09 AM
тАО11-24-2005 09:09 AM
Re: VAX PASCAL
Sunil,
I am not sure how much you familier using LIB$SPAWN RTL routines, but as you mentioned you want execute A.com when program actually starts run ( is it before pascal start run ?), then I would like to suggest you better include $RUN PasProg.exe command line inside A.com at the end. Like
A.com
=====
$define....
$assign....
$dclsym=="JOBName"
...
...
$run PasProg.exe
$deassign...
$exit
Or if you want to execute A.com in the middle of your pascal program, then as Mr.WIM said, LIB$SPAWN is the next easiest way in VMS.
Also if you require to pass/process any DCL symbol from DCL and pascal back and forth, you can use LIB$GET_SYMBOL and LIB$DELETE_SYMBOL routines.
there is little more related info in this link under "Why do lib$spawn, lib$set_symbol fail in detached
processes?"
http://www.levitte.org/~ava/txt/vmsfaq.txt
Archunan
I am not sure how much you familier using LIB$SPAWN RTL routines, but as you mentioned you want execute A.com when program actually starts run ( is it before pascal start run ?), then I would like to suggest you better include $RUN PasProg.exe command line inside A.com at the end. Like
A.com
=====
$define....
$assign....
$dclsym=="JOBName"
...
...
$run PasProg.exe
$deassign...
$exit
Or if you want to execute A.com in the middle of your pascal program, then as Mr.WIM said, LIB$SPAWN is the next easiest way in VMS.
Also if you require to pass/process any DCL symbol from DCL and pascal back and forth, you can use LIB$GET_SYMBOL and LIB$DELETE_SYMBOL routines.
there is little more related info in this link under "Why do lib$spawn, lib$set_symbol fail in detached
processes?"
http://www.levitte.org/~ava/txt/vmsfaq.txt
Archunan
Regards
Archie
Archie
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP