Difference between revisions of "Spool file"

From MidrangeWiki
Jump to: navigation, search
m
(+ link to printing 101)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
[[Category:Administration]]
 
[[Category:Administration]]
 
[[Category:Output to Print]]
 
[[Category:Output to Print]]
Output from programs on the 400 often go to a report stored in a spool file.  When we make changes to where the report is "located" we are not moving it on disk, but changing its name headers wich are the basis of how lists of reports show up on vartious displays.
+
In very early computers, when a program generated output destined for a printer, the printer had to be turned on and ready to print.  Each line of output was printed immediately on the printer.  When multiple partitions / multiple users became available, printing was virtualised, so that the operating system buffered the output so that it could be printed at a later time (or not at all!)  This buffering is called spooling.  SPOOL is an acronym: Simultaneous Peripheral Operations On-Line.
 +
 
 +
IBM i accumulates printer output in objects called [[OUTQ|output queues]].  Each virtual printer output from a program creates a separate object called a spooled file, which is stored within a specific output queueSpooled files can have various actions performed on them:
 +
 
 +
{| class="wikitable"
 +
|+ Spooled file actions
 +
! Command !! Use
 +
|-
 +
| CHGSPLFA || Change spooled file attributes (details like form type, copies, etc)
 +
|-
 +
| CPYSPLF || Copy a spooled fileto a DB2 table
 +
|-
 +
| DLTSPLF || Delete (permanently remove) a spooled file
 +
|-
 +
| HLDSPLF || Hold a spooled file - stops it from printing unless released
 +
|-
 +
| RLSSPLF || Releases a spooled file - allows it to be printed if the output queue is attached to a print writer
 +
|-
 +
| SNDNETSPLF || Sends a spooled file to another IBM i system
 +
|-
 +
| SNDTCPSPLF || Sends a spooled file to a system via LPR
 +
|}
 +
 
 +
A spooled file differs from a printer file, in that a spooled file is the finished output from a program, while a printer file is the DDS-defined object that a program uses to format the output with.
 +
 
  
 
== [[WRKSPLF]] ==
 
== [[WRKSPLF]] ==
Line 15: Line 39:
 
If you key this, and press enter, you get a list of all the OUTQ that have been setup, that you may see in your Library List.
 
If you key this, and press enter, you get a list of all the OUTQ that have been setup, that you may see in your Library List.
  
You can then view all the reports in a particuar Q, or do other actions against the contents.
+
You can then view all the reports in a particular queue, or do other actions against the contents.
  
If you know the name of some outq, keying WRKOUTQ then that name, gives you the list of what reports are there.
+
If you know the name of some output queue, keying WRKOUTQ then that name, gives you the list of what reports are there.
  
 
== [[WRKWTR]] ==
 
== [[WRKWTR]] ==
Line 55: Line 79:
  
 
Output from a program typically can go to a printer file.  We can [[CRTPRTF]] create one with no structure, or we can compile one from [[DDS]].  After creating one, we can [[CHGPRTF]] change some characteristics over and above what a source file can do for us.  We can copy some printer file that was created for some other program, then [[CHGPRTF]] the copy to meet the needs of why we made the copy.
 
Output from a program typically can go to a printer file.  We can [[CRTPRTF]] create one with no structure, or we can compile one from [[DDS]].  After creating one, we can [[CHGPRTF]] change some characteristics over and above what a source file can do for us.  We can copy some printer file that was created for some other program, then [[CHGPRTF]] the copy to meet the needs of why we made the copy.
 +
 +
== References==
 +
* [[Printing_101|IBM i printing basics]]

Latest revision as of 14:16, 25 June 2015

In very early computers, when a program generated output destined for a printer, the printer had to be turned on and ready to print. Each line of output was printed immediately on the printer. When multiple partitions / multiple users became available, printing was virtualised, so that the operating system buffered the output so that it could be printed at a later time (or not at all!) This buffering is called spooling. SPOOL is an acronym: Simultaneous Peripheral Operations On-Line.

IBM i accumulates printer output in objects called output queues. Each virtual printer output from a program creates a separate object called a spooled file, which is stored within a specific output queue. Spooled files can have various actions performed on them:

Spooled file actions
Command Use
CHGSPLFA Change spooled file attributes (details like form type, copies, etc)
CPYSPLF Copy a spooled fileto a DB2 table
DLTSPLF Delete (permanently remove) a spooled file
HLDSPLF Hold a spooled file - stops it from printing unless released
RLSSPLF Releases a spooled file - allows it to be printed if the output queue is attached to a print writer
SNDNETSPLF Sends a spooled file to another IBM i system
SNDTCPSPLF Sends a spooled file to a system via LPR

A spooled file differs from a printer file, in that a spooled file is the finished output from a program, while a printer file is the DDS-defined object that a program uses to format the output with.


WRKSPLF

If you key this, and press enter, you get a list of all reports that you have created.

If you know some co-worker name, keying WRKSPLF then their name, will call up list of their reports.

WRKSPLF then F4 - top line some user name - second line some OUTQ = gives you list of just that person reports in that particular OUTQ.

WRKOUTQ

If you key this, and press enter, you get a list of all the OUTQ that have been setup, that you may see in your Library List.

You can then view all the reports in a particular queue, or do other actions against the contents.

If you know the name of some output queue, keying WRKOUTQ then that name, gives you the list of what reports are there.

WRKWTR

List Writers (Printers) and check on their status and what reports are waiting to print.

F21

F21 on any of the printer command screens toggles between Basic / Intermediate levels of how the data is provided.

Overrides

Within CLP programs we can apply overrides at run time. For convenient reference here are some that are available in addition to spool file.

When we develop some program, it is setup to use a particular physical or logical file with the output to a report at a particular location, and use some display screen.

At execution time, there can be overrides.

  • OVRDBF Override Data Base File
    • same file but different member
    • same file but different logical
    • same file layout but different library's version of it
  • OVRDKTF Override Diskette File
  • OVRDSPF Override Display File
  • OVRPRTF Override Printer File
    • Save it after printing
    • Give it a meaningful label on spool list
    • Send it to CPYSRCF dump format
      • won't look pretty
    • OUTFMT get at *HEX packed format contetns
  • OVRTAPF Override Tape File

At the end of the CLP program we typically DLTOVR delete the overrides that were used by that program.

We can also DSPOVR Display Override.

Create Printer File

Output from a program typically can go to a printer file. We can CRTPRTF create one with no structure, or we can compile one from DDS. After creating one, we can CHGPRTF change some characteristics over and above what a source file can do for us. We can copy some printer file that was created for some other program, then CHGPRTF the copy to meet the needs of why we made the copy.

References