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: Creating a queue

Original Message
Name: jwulli
Date: September 28, 2004 at 04:53:19 Pacific
Subject: Creating a queue
OS: OpemVMS 6.2
CPU/Ram: 266
Comment:
I would like to create a queue, writing the data to a file. The date is in ASCII. The output file is in dka0:[test]test.dat

Thanks for your answers and tipps

wulli



Report Offensive Message For Removal

Response Number 1
Name: Bob Gezelter
Date: September 28, 2004 at 05:11:00 Pacific
Subject: Creating a queue
Reply: (edit)
I am not sure that I understand your question. Which programming language are you writing in? Why do you say "writing a queue"? Are you writing a file, which is to be indexed by date, and processed by date?

To write a simple sequential text file from DCL (the command language), use the OPEN, WRITE, and CLOSE commands (see the HELP text for details). If you are appending to the file, you can use the OPEN/APPEND command. Creating an indexed file is not difficult, however, you must declare the characteristics and location of the index key(s).

For example:

$ CREATE DKA:[TEST]TEST.DAT
$ OPEN/APPEND FILE DKA:[TEST]TEST.DAT
$ WRITE FILE "20040928060000KUMQUAT"
$ CLOSE FILE

Would write a file with the leading Time of Year in the first 14 characters. This file COULD be created using an FDL (CREATE/FDL) specifying the file as an indexed file.

For a file indexed by date, I would suggest that you convert the ASCII date into a more consistent format, namely YYYYMMDD. Personally, I would add the time of day to that key, generating YYYYMMDDHHMMSS as the key (the F$CVTIME lexical function, documented under the HELP for LEXICAL) can do much of the conversion from ASCII dates to a comparison friendly date.

The HELP text is extensive. The entire OpenVMS documentation set is available via the HP OpenVMS www site (http://www.hp.com/go/openvms). Most of the manuals are available in both PDF and HTML.

I hope that the above is helpful. If I have been unclear, please let me know.

- Bob Gezelter


Report Offensive Follow Up For Removal

Response Number 2
Name: jwulli
Date: September 28, 2004 at 07:27:22 Pacific
Subject: Creating a queue
Reply: (edit)
Thanks for your help.
Sorry, my explanation of the problem was a bit short. I'll try it again: An automated test system creates a data file while a test is running, which will be printed out of the printer queue sys&print on the local printer. Now, I would like to change the printer queue or create a new one to write the date in an external file so I can store it on a disk. The problem is, the date file created from the test system will be deleted after finishing the test, that's why I can's use it directly.

Thanks for your answer

Jan


Report Offensive Follow Up For Removal

Response Number 3
Name: Bob Gezelter
Date: September 28, 2004 at 08:32:10 Pacific
Subject: Creating a queue
Reply: (edit)
Jan,

That is a bit of different question. The answer depends upon how the Automated test system is writing the file and generating the request to send it for printing.

In the worst case, it can get pretty ugly (though rarely used, it is possible to spool files directly to the printer). However, if the automated process is using more common methods, it is possible to intercept the print request and copy/save the file.

How much information do you have about the automated test system and its implementation?

- Bob
P.S. If you want to do this offline, you can certainly contact me via email.


Report Offensive Follow Up For Removal

Response Number 4
Name: WillemGrooters
Date: September 29, 2004 at 01:13:23 Pacific
Subject: Creating a queue
Reply: (edit)
Jan,

If I understand well, the test system creates a file and then sends it to SYS$PRINT.
That means, the file exists.
Now, depending how the test system gets this file printed, you can take measures to prevent the file being deleted.
If in DCL, or even programmed to be sent to JobControl, prevent the file being deleted aftre print. In DCL, it may take the /DELETE aulifier, you'll need to remove that. If programmed, you'll need to check the program to see if this option is part of the call and if so, to remove it (see System Services manual on $SNDJBC service for details, I havn't them at hand).
If output is directly spooled to the printer (which is, as Bob correctly stated, 'pretty ugly' (I think this an understatement...)) you definitely have to either change the program to write to a file instead. anyway: take a CLOSE look to the test procedure: it may indeed create a (temporary) file which is spooled - using SNDJBC, or, as I've seen, SPAWN a subprocess executing a PRINT command
(Bob, do you agree that THAT is ugly?)

Willem


Willem Grooters


Report Offensive Follow Up For Removal

Response Number 5
Name: Bob Gezelter
Date: September 29, 2004 at 02:44:46 Pacific
Subject: Creating a queue
Reply: (edit)
Yes, Willem, that is the type of thing that I was referring to as ugly.

If he has the sources, or the procedure for running the job and queueing the test results is in DCL, then yes, changing the qualifier is no problem. If he does not have the sources, then things get messier.

It is possible to write directly to a spooled device, in which case you will likely get a temporary file queued for printing by File ID.

I can think of ways to re-capture the information, but I do not wish to raise more complexity than is necessary to solve the problem. If all we have to do is remove the /DELETE qualifier from a line of DCL, that is easy. If it is more involved, I would rather get the answer correct in as few iterations as possible.

- Bob


Report Offensive Follow Up For Removal

Response Number 6
Name: jwulli
Date: September 29, 2004 at 07:19:58 Pacific
Subject: Creating a queue
Reply: (edit)
Thanks for your infos and tipps!

I have bad news:
- there are no DCL procedures creating the print process!
- the source of the programm isn't available.
- the manufacturer of the testsystem, Lockheed Martin, programmed, to spool the data to the printer.

I think, the easiest way to get the data is to connect a PC to the printercable and capturing it with a hyperterminal.

Jan


Report Offensive Follow Up For Removal

Response Number 7
Name: Bob Gezelter
Date: September 29, 2004 at 13:41:02 Pacific
Subject: Creating a queue
Reply: (edit)
Jan,

Ok, that makes things difficult, not impossible.

Manually using Hyperterm is a possibility, but it is tedious and error prone on a regular basis.

I can think of several ways to capture the print stream, but they are beyond what I am comfortable suggesting in an open forum (I do not mind suggesting straightforward solutions and answering questions, but involved answers are beyond the scope of my contribution to public well-being).

If an automatic solution is of interest, please drop me a note via email and we can speak further. I believe that the problem has an efficient solution, but it is a bit longer than a couple of lines of code.

- Bob


Report Offensive Follow Up For Removal

Response Number 8
Name: Hakan Andersson (by HakAnd)
Date: October 5, 2004 at 06:42:51 Pacific
Subject: Creating a queue
Reply: (edit)
If you just want to capture this file.......
Stop the queue SYS$PRINT, Run the test, save the file, delete the entry and start the queue SYS$PRINT again.

Maybe I'm not understand the problem.......

regards,

Hakan


Report Offensive Follow Up For Removal

Response Number 9
Name: lsobelman
Date: October 29, 2004 at 11:54:57 Pacific
Subject: Creating a queue
Reply: (edit)
Perhaps it is as simple as defining a symbol under which that process runs as follown

print:=="print/nodelete"

Since you do not have the source, perhaps it does a lib$spawn to do the print via dcl

Just a suggestion

Larry


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: Creating a queue

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