- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to control execution time of DCL commands
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
тАО09-11-2008 10:08 PM
тАО09-11-2008 10:08 PM
I am using Open VMS version 7.3-2.
I have a problem executing a command procedure with FTP commands in it. Sometimes the FTP command does not exit due to slow connections. In such a case a manual CTRL+Y needs to be done but instead i want to abort and continue with the remaining execution automatically. How can i run the command procedure for certain duration of time so that it terminates irrespective of whether the FTP commands have been executed or not?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2008 10:19 PM
тАО09-11-2008 10:19 PM
Re: How to control execution time of DCL commands
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2008 12:13 AM
тАО09-12-2008 12:13 AM
Re: How to control execution time of DCL commands
Thanks a lot for your suggestion. I'll try it out.
Regards,
VIjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2008 01:43 AM
тАО09-12-2008 01:43 AM
Re: How to control execution time of DCL commands
Another alternative is to use the batch queues, although there is no guarantee that the job starts immediately (the queue may be busy or stopped).
In either case, be very careful that it is possible to tell the difference between a completed and uncompleted task. It is all too easy to find that ftp has transferred less than a complete file, and have later stages of the application become confused by processing a truncated file.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2008 01:52 AM
тАО09-12-2008 01:52 AM
Re: How to control execution time of DCL commands
Thanks a lot for the reply. Will try to implement.
I have another question. Can the same command procedure be invoked simultaneously by different processes passing different parameters (like FTP address and file names) ? something like multithreading..In such a case where each request to that command procedure is processed seperately (and simultaneously) using NOWAIT will be easier..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2008 01:56 AM
тАО09-12-2008 01:56 AM
Re: How to control execution time of DCL commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2008 04:41 AM
тАО09-12-2008 04:41 AM
Re: How to control execution time of DCL commands
> invoked simultaneously by different
> processes [...]
Normally, yes (unless your command procedure
does something inappropriate, like, say, use
a fixed name for a temporary file).
> [...] something like multithreading [...]
More like multiprocessing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2008 08:08 AM
тАО09-12-2008 08:08 AM
Re: How to control execution time of DCL commands
$ PID = F$GETJPI(0,PID)
$ SPAWN /PROCESS=SUB_'PID' -
@PROCESS_WATCHER 'PID' 00:05:00
$ COPY/FTP ...
$ STATUS = $STATUS
$ STOP SUB_'PID'
$ IF (.NOT.STATUS) THEN ...
$!----------PROCESS_WATCHER.COM--------
$ SET NOON
$ WATCHED_PID := 'P1' !Pass process ID in as P1
$ IF (WATCHED_PID .EQS. "") THEN WATCHED_PID = F$GETJPI(0,"MASTER_PID")
$ P2 = P2-"+" !Pass max wait time in as P2 w or w/o +
$ IF (P2 .EQS. "") THEN P2 = "00:02:00"
$ END_CTIME = F$CVTIME("+''P2'")
$ IF (.NOT.$STATUS) THEN END_CTIME = F$CVTIME("+00:02:00")
$ INTERVAL := 'P3' !Interval between checking for new I/O
$ IF (INTERVAL .EQS. "") THEN INTERNVAL := 00:00:30
$!----------------
$! PRIME DATA
$!-----------
$ CURBIO = F$GETJPI(WATCHED_PID,"BUFIO")
$ IF (.NOT.$STATUS) THEN EXIT
$ CURDIO = F$GETJPI(WATCHED_PID,"DIRIO")
$LOOP:
$ LASTBIO = CURBIO
$ LASTDIO = CURDIO
$ WAIT 'INTERVAL'
$!--------------------
$! CHECK CURRENT INFO
$!--------------------
$ CURDIO = F$GETJPI(WATCHED_PID,"DIRIO")
$ CURBIO = F$GETJPI(WATCHED_PID,"BUFIO")
$ DIO = CURDIO - LASTDIO
$ BIO = CURBIO - LASTBIO
$! If no I/O occured or if this has been going on too long kill our master.
$ IF ( (DIO.GT.0 .OR. BIO.GT.0) .AND. -
F$CVTIME() .LTS. END_CTIME ) THEN GOTO LOOP
$ FEXIT /ID='WATCHED_PID'
$ EXIT
$! this process is spawned from a command procedure that
$! is doing an inline COPY/FTP or another FTP process.
$! it could be any process really.
$! it will wait the time in P2 and FEXIT the process ID in P1
$! passed in as p2 if wait time is reached or no I/O in any P3 interval.
$!----------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2008 09:52 PM
тАО09-14-2008 09:52 PM
Re: How to control execution time of DCL commands
I have tried out your solution. Actually am new to DCL coding.
I'm getting the following error after executing the above command procedure.
$ FEXIT /ID=00036D43
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\FEXIT\
Thanks in advance for the help.
Regards,
Vijay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2008 12:13 AM