AS/400 HELP    

                                      "PRINTLOG" 

                           

 

PRINTLOG   saves and displays a log of spool files sent to one or more output queues.  As a soon as a spool file reaches the  ‘RDY’ state the AS/400  sends a record  of data about this spool file to the PRINTLOG data queue (DTAQ)  (and any later actions on the spool file such as  releasing it etc).   Program PRINTLOG sends this data from the dtaq to a file (also) named PRINTLOG. 

Program PRTHIST displays these records and also allows you to select which particular outq  to view.  Records in the file show the jobs that WENT to the outq(s) regardless if they were subsequently printed or not. 

API QUSRSPLA  adds the  forms-type, copies, program  and pages to each record. If  there is an error calling this api  ‘NOT AVAIL’ is placed / shown in Form-Type

PRINTLOG was developed at V5r1 and saved at V4r4.

DOWNLOAD printloglb.SAVF

 

Please read and understand all the instructions below before installing PRINTLOG.

 

PC INSTRUCTIONS:

Download "PRINTLOGLB” to your PC.

Go to a DOS session and enter the following;

FTP SYSTEM                                        (system = your AS/400’s name or IP address)

Enter a valid user id and password

CD QGPL

LCD C:\DIRECTORY (directory= the directory on your pc where you downloaded “ printloglb.savf”

QUOTE    SITE     NAMEFMT   1

BIN

PUT       PRINTLOGLB.SAVF

QUOTE   RCMD   RSTLIB   SAVLIB(PRINTLOG)   DEV(*SAVF)   SAVF(QGPL/PRINTLOGLB)

 Note:  If there is a security problem restoring all objects with the command above,  sign on to your as/400 as Qsecofr and run RSTLIB  from the command line.

 

AS/400 INSTRUCTIONS:

INSTALL SECTION;  (1 time only after PRINTLOG is restored to the As/400)

ADDJOBQE SBSD(QSYS/QBATCH) JOBQ(PRINTLOG/PRINTLOG) MAXACT(1) SEQNBR(NNN)

NNN = a unique sequence number. Use the command:

DSPSBSD SBSD(QSYS/QBATCH)  and take option 6.  Use a Seq Nbr not already allocated.

STARTING AND STOPPING PRINTLOG:  

To start:    CALL PRINTLOG/STARTPL

To End:      CALL PRINTLOG/STOPPL

NOTE: Verify PRINTLOG is working by entering command: WRKACTJOB. You should see PRINTLOG running under QBATCH.

NOTE: STARTPL starts the PRINTLOG in Qbatch and waits for a 128 character string of spool info or a string with the the word ‘QUIT’ (from STOPPL)

NOTE: STOPPL sends the word ‘QUIT’ to PRINTLOG which stops the program from collecting data. If PRINTLOG is not active it will wait in the dtaq  until read and then perform its job.  Calling STOPPL twice or more in succession will make it appear PRINTLOG is not working as it will stop PRINTLOG every time it goes through.

 

ADD PRINTLOG TO AN OUTQ:      (YOURQUE = an actual outq on your AS/400)

Enter   CHGOUTQ YOUROUTQ    press F4 & F10 , Roll up to the (next) screen showing ADDITIONAL PARAMETERS  and enter;

Data queue. . . . . .            PRINTLOG

  Library. . . . . . .             PRINTLOG

IMPORTANT ! (if there are entries already in these fields STOP.  DO NOT REPLACE THEM.

 

Repeat the above step for each outq you want to add PRINTLOG.   

TO view the history log

ADDLIBLE  PRINTLOG

CALL  PRTHIST

 

NOTE:  As soon as you attach the PRINTLOG data queue  to an output queue  data starts to collect. The program PRINTLOG takes each entry from the queue and transfers it to the database file.   Without PRINTLOG program running this data queue will get ‘FAT’     The file PRINTLOG should be cleared once in a while.

You can run PRINTLOG without  using it via a JOBQ.

On a command line enter: CALL PRINTLOG/PRINTLOG

This will cause all entries collected in the data queue to be transferred to the database file

Wait at least a few minutes and then go to another session and enter on a command line:   CALL PRINTLOG/STOPPL

  

Confused ??? mailto:EMAIL  rpascas@hotmail.com  (I reread this after a few beers and I was confused)