Sponsored Content
Full Discussion: Spool data file
Operating Systems AIX Spool data file Post 302287198 by lweegp on Friday 13th of February 2009 02:20:31 AM
Old 02-13-2009
Spool data file

Dear Gurus,

Tried searching for some clues in this forum but dont seem to be able to find my answer. Smilie

Anyway i have a quick question:

Today I have produced a messages generated from a application and placed them on the print queue. Before this I had stopped the printer queue, so that I can capture the spooled data as a file. I need to create the spool file from the print job queue. How can I do that? Realised I can't use lp command to do it...clueless now...Smilie

thanks. Smilie


lweegp
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to spool a unix file

hi, can anyone help me by saying how can i spool a unix file.. do we need to specify the pathname as such to spool the file .. right now, i tried giving like spool filename in the sql prompt.. but its not giving me the required output even if i can see that the command is being executed.. ... (2 Replies)
Discussion started by: kripssmart
2 Replies

2. Shell Programming and Scripting

grep spool file error

Hi, I am trying to do this For i in *.txt do sed 'some pattern checking' $i done >file These text files are spool files.And when i find error in these spool files I want to append the text file contents to error.log file. Or is there any option that I do this sed for only files that... (12 Replies)
Discussion started by: ran16
12 Replies

3. UNIX for Dummies Questions & Answers

SQLPlus spool file

HI Have some problem with spooling out some relatively large number of records (~2-3 mil) Small table - OK though. Getting error: SP2 0308: cannot close spool file. Any thoughts? sqlplus -s user/pwd << EOF set term off set head off set trims on set pages 0 set... (1 Reply)
Discussion started by: Leo_NN
1 Replies

4. Shell Programming and Scripting

Problem in spool file

Hi, Iam a newbie. When I give the below query at SQL prompt. SQL> select col1||'`ß`'||col2 from tablename where rownum<2; 1-J7WGX`ß`1-7OKC-23 Iam getting ß within appostropies...... If I remove appostropies and give the query it is throwing an error. If I give the same query in spool as... (1 Reply)
Discussion started by: kknayak
1 Replies

5. Shell Programming and Scripting

spool to file in ksh

hi all, am trying to write a ksh script which will take a username, password, db instance as input arguments and login to the database using sqlplus and select some data via sql and spool to a file. problem is that i am using "sqlplus -s" in order to hide the username/password and it doesnt... (8 Replies)
Discussion started by: cesarNZ
8 Replies

6. Shell Programming and Scripting

Spool file, only if data exists.

Hi All, I have one Question, that is it possible to check the spool output? What i mean to say is "spool the file only if data exists" I am trying to fetch data from a sql query, and want to generate a file, on a condition that the file should be generated, only if the output of the sql... (5 Replies)
Discussion started by: spiabhi
5 Replies

7. Shell Programming and Scripting

Spool Data in a file

Hello, I am trying to spool data from database into a file on solaris through ksh. Data is getting fetched but the problem is record is getting split in to multiple lines. excerpt from sql is whenever sqlerror exit 1; set define on set echo off set feed off set head off set... (1 Reply)
Discussion started by: abhi1988sri
1 Replies

8. UNIX for Dummies Questions & Answers

Column Header in the Spool file

Hi All, I have a problem with the column heading while spooling the data from the database. Since i want the column header, therefore i am not using SET HEADING OFF, and i am getting the header, but for the longer column name, some of the character from the column name is missing. for... (7 Replies)
Discussion started by: Pramod_009
7 Replies

9. Shell Programming and Scripting

Spool file requirement

Hi, I have a requirement of Connecting to sqlplus from unix Execute the package. The output of package is stored in a table Need to query the table and move to txt file. The problem iam facing is, when I try to spool the file. I get the sql query also along with the output.... (6 Replies)
Discussion started by: Shanmugapriya D
6 Replies

10. Shell Programming and Scripting

Order of data in Spool File

Hello, I have a shell script through which I am executing .sql file and spooling the result of Query from .sql . I want to spool the result in ascending order. Is there any parameter to be set to print result in ascending or descending order. Thanks in advance. (4 Replies)
Discussion started by: Aparna.N
4 Replies
lpq(1)							      General Commands Manual							    lpq(1)

Name
       lpq - spool queue examination program

Syntax
       lpq [ options ] [ job #...  ] [ user...	]

Description
       The  command  examines  the  spooling  area used by for printing files on the printer, and reports the status of jobs.  The command invoked
       without any arguments reports on any jobs currently in the default queue.

       When jobs are being printed, reports the queue as being ``active''.  For each job submitted, reports the user's name, current rank  in  the
       queue,  the names of files comprising the job, the job identifier and the total size in bytes.  The job identifier is a number which may be
       supplied to to remove a specific job.

       Job ordering is determined by the FIFO (First In, First Out) algorithm used to scan the spooling  directory.   When  the  queue	is  empty,
       reports that there are ``no entries''.

       File  names  may  be unavailable for some jobs, for example, if the command is used without specifying a file name, or if is used in a pipe
       line.  If file names are unavailable, the file name reported by is ``standard input''.

Arguments
       job #...    Causes to report on only the job number(s) specified.

       user...	   Causes to report on only the jobs for the specified user(s).

Options
       +n   Scan and display the spool queue until the queue is empty.	The queue is scanned every n seconds, if  no  argument	is  specified  the
	    queue is scanned every 30 seconds.

       -l   Display the status of each job on more than one line if necessary.	If this option is not used, the status of each job is displayed on
	    one line.

       -Pprinter
	    Report the status of the spool queue for the printer specified.  If this option is not used, the spool  queue  displayed  is  the  one
	    defined by the PRINTER environment variable.  If a queue is not defined by the PRINTER environment variable, the spool queue displayed
	    is for the printer named ``lp'' in the file.

Restrictions
       The displayed status of the spool queue may not always be the current status.  This is because jobs may be completed after  the	queue  has
       been examined, but before the status has been displayed.

Error Messages
       Two of the most common error messages from are:

       Warning: no daemon present (R)
       A daemon is not available for the specified printer.  Refer to the command to find out how to restart the printer daemon.

       unknown printer (R)
       The printer specified as an argument to the -P option, doesn't have an entry in the file.

Files
       For manipulating the screen for repeated display

       To determine printer characteristics

       The spooling directory, as determined from printcap

       Control files specifying jobs

       The lock file to obtain the currently active job

See Also
       lpr(1), lprm(1), lpc(8), lpd(8)

																	    lpq(1)
All times are GMT -4. The time now is 07:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy