TAA Tools
DSPSPLF2        DISPLAY SPOOLED FILE 2                 TAASPLW

The Display  Spooled File 2  command is similar  to the system  DSPSPLF
command.     DSPSPLF2   is  intended   for   users  who   operate  from
workstations  which display  132 column  mode.   Because the  font size
can be difficult to read  on certain devices, some users may  prefer to
force an  80 wide display.   Those devices  which use a PC  monitor can
take  excessive time  when the  display changes from  80 to  132 column
mode and vice versa.

DSPSPLF2 reads the  data and uses  an 80 wide  display file to  display
the spooled file.   It is very  effective on small spooled  files.  All
the functions  of DSPSPLF such as  windowing, rolling, paging, folding,
and searching are supported.  Help text is also provided.

Two significant functions have been  added to DSPSPLF2 over the  system
DSPSPLF command.  See the later section on enhancements.

Some  users may  prefer  to see  a  larger size  font  on the  80  wide
display  and may wish  to force  the use  of DSPSPLF2 even  though they
have  a 132  wide capable device.   The default  is to use  the 80 wide
display if the print width is 78 bytes or less.

A typical command would be entered as:

            DSPSPLF2   FILE(xxx)

The  first  time  DSPSPLF2  is  used,  a  data   area  (TAADSPSPL2)  is
established in  QTEMP using  defaults.  By  default, the values  in the
data  area determine  if the  DSPSPLF2 function  or the  DSPSPLF system
command should be  used.   The QTEMP data  area can be  changed by  the
user with the CHGSPLF2 command.

See the later section on CHGSPLF2 options.

The FRC80WIDE parameter  may be used on  DSPSPLF2 to force the  80 wide
display of the DSPSPLF2 function.

System wide use of DSPSPLF2
---------------------------

While DSPSPLF2  can be used as an  individual command, the intended use
is system  wide to  be  used instead  of  the system  DSPSPLF  command.
Because  DSPSPLF2 determines  if  its function  or  the normal  DSPSPLF
command should be used, a system wide solution is practical.

Such  functions  as  WRKSPLF,  WRKOUTQ,  PDM,  SEU  etc,  provide  menu
options  for  DSPSPLF.   The  Security  Officer  can easily  set  up an
environment where DSPSPLF2 will be used instead.

You  can have  all  combination  of  PC devices,  80  wide  workstation
devices, or 132  wide workstation devices on the  same system and still
use a system wide DSPSPLF2 solution.

Defaults  exist so that the  use of the DSPSPLF2  function will only be
selected based  on the  device and  the  spooled file  characteristics.
The  Security  Officer  can  change the  shipped  defaults  to  make  a
tailored solution.   Individual users could tailor  the values used for
their job with the CHGSPLF2 command.

See  the  later  section  on  'Creating  a  System  Wide  Solution  for
DSPSPLF2'.

DSPSPLF2 Enhancements
---------------------

There  are  two  significant  enhancements  that   have  been  made  to
DSPSPLF2 over the system command DSPSPLF.

  **   Searches that  'ignore case'.  DSPSPLF requires  that the search
       value  be entered  exactly as  the data  appears in  the spooled
       file.  The search only  finds the data that is the  'same case'.
       DSPSPLF2  supports this  as an  option,  but uses  a default  of
       'ignore  case' meaning that  both the search value  and the data
       are translated to upper case and then compared.

  **   Enter key does not do a  return.  DSPSPLF will end if the  Enter
       is pressed without  any entries in the Control  field.  DSPSPLF2
       produces  an error message  and requires the  use of F3  or F12.
       This avoids the  situation where  it has  taken several  seconds
       to get  to the display  and then have  an inadvertent Enter  key
       end the function.

CHGSPLF2 Options
----------------

When  DSPSPLF2 is  run, it checks  for a  data area  in QTEMP  with the
name  of TAADSPSPL2.   If the data  area does not  exist, it is created
with default  values.   The  Security Officer  can  change the  shipped
defaults (See  the later section  on 'Changing the  Shipped Defaults').

An  individual  user  can  use  CHGSPLF2  at  any  time  to modify  the
defaults for his job.

The options in the data area allow:

  **   Whether DSPSPLF2 should  be used  or not.   The shipped  default
       is *DEV78 which means:

       If the  print width is 78  bytes or less, the  DSPSPLF2 function
       is used.

       If  the print width  is more than  78 bytes, the  device type is
       checked for '132  wide capable'.   If it is  recognized as  '132
       wide capable',  the system DSPSPLF  command is used.   If it  is
       not in the  list, the DSPSPLF2 function is  used.  See the later
       discussion on '132 Wide Device Capability'.

       A  *YES  may be  entered to  use DSPSPLF2  based on  the maximum
       number of pages parameter.

       *NO may be entered to always cause the use of DSPSPLF.

  **   Maximum pages  for  DSPSPLF2.   If  the  spooled file  has  many
       pages, the  use of DSPSPLF2  is questionable from  a performance
       viewpoint.    The shipped  default is  100  pages, but  this may
       need to be varied based on  CPU model and personal desires.   If
       the maximum  value is exceeded,  DSPSPLF is  used automatically.

       There  is  a   limitation  to  DSPSPLF2  of  9,999  print  lines
       (assuming 50 lines to  a page, this  would be approximately  200
       pages).  If more  than 9,999 print lines exist,  DSPSPLF is used
       automatically.   There is also  a limitation of 1000  pages.  If
       this value is exceeded, DSPSPLF is used automatically.

  **   Maximum  pages for status  message.  The  shipped default is 25.
       DSPSPLF2 must  use  CPYSPLF  internally to  access  the  spooled
       data.   If the number of  pages exceeds 25, a  status message is
       sent  while CPYSPLF is in  operation.  This  informs the user of
       the delay, but since  the message may  be annoying and the  time
       will  vary per  CPU, the  user is  allowed control  over if  and
       when the message is sent.

Testing
-------

To test  the DSPSPLF2 function, try the command  on one of your spooled
files.

             DSPSPLF2   FILE(xxx)

If the title is 'Display Spooled File  2 - TAA' you are looking at  the
DSPSPLF2 screen  You can try  out the functions  of the Control  field,
the  Find  field (search),  and  the  fold function.    They should  be
similar to the system DSPSPLF function.

If  you see the  normal DSPSPLF screen, enter  the command CHGSPLF2 and
press F4 to prompt.   Change the ALWUSE value  from to *YES.   Then try
DSPSPLF2 again.

Performance
-----------

DSPSPLF2  performs well up  to a  file of  about 100  pages.   If large
files  are used, the  CPYSPLF time gets  to be rather  large.  However,
if you  spend a  lot  of time  with  the spooled  file, you  may  still
prefer DSPSPLF2.

The first  time DSPSPLF2  is run,  it will  create the TAADSPSPL2  data
area in  QTEMP.  Further use  of DSPSPLF2 in the  same job should cause
faster results.

If you roll thru the  file, internal arrays are  used to keep track  of
which  page and  line  number  is  associated with  each  spooled  file
record.  If  you skip to a page or record  number (or Bottom) where the
spooled  file record  has not  been read, all  of the  records from the
last record read to the one  required are read.  If the  spooled record
you want has  already been read, skipping forward  or backward by page,
by a count, or by a relative count is fast.

The  search function is performed by reading  the records and using the
RPG scan op code.   This is slower than  the DSPSPLF function, but  the
performance is probably better than you would expect.

DSPSPLF2 Command Parameters                           *CMD
---------------------------

The parameters are the same as the system DSPSPLF command.

   FILE          The spooled file name to be displayed.

   JOB           The  job  name,  user  name, and  job  number  of  the
                 spooled  file.  The  default is *  meaning the current
                 job.

   SPLNBR        The spooled file number.   The default is *ONLY.   The
                 special value  *LAST or a  spooled file number  may be
                 entered.

   FOLD          A *YES/*NO  value that determines if the  data will be
                 folded.   The default is *NO  meaning one line will be
                 used per  spooled  line.   If  *YES is  specified  the
                 first record in  the file is is displayed  in a folded
                 manner.    A  function  key  also  allows 'fold  mode'
                 during the display.

   FRC80WIDE     A *YES/*NO  value  that  determines  if  the  80  wide
                 display file  will be forced.   The default is  *NO in
                 which  case  the values  in the  TAADSPSPL2  data area
                 are used  to  determine if  the  80 wide  function  is
                 used.

                 *YES may  be specified  to force  the 80 wide  display
                 function of DSPSPLF2.

CHGSPLF2 Command Parameters                           *CMD
---------------------------

A  prompt override program  exists for  use if  F4 is pressed  when the
command  is  entered.   The information  is  taken from  the TAADSPSPL2
data area  in  QTEMP.   The documentation  describes  the defaults  for
each of  the command parameters, but if  F4 is used, the  user will see
the values that exist in the data area.

On the  first use of DSPSPLF2 or CHGSPLF2,  the data area is created in
QTEMP based  on defaults.   See the  section on  'Changing the  Shipped
Defaults'.

   ALWUSE        The default is *DEV78 which means:

                 If the print  width is 78 bytes or  less, the DSPSPLF2
                 function  is  used.   This allows  easier  viewing for
                 smaller width spooled files.

                 If the  print  width is  greater  than 78  bytes,  the
                 device  type is  checked  against  a list  of  devices
                 within   the  program.     If   the  device   type  is
                 recognized  as '132 wide  capable', the system DSPSPLF
                 command is used.   If the device is not  recognized as
                 '132 wide  capable'.   the DSPSPLF2 function  is used.
                 See  the later section for more  details about how the
                 device types are recognized as '132 wide capable'.

                 *YES may  be  entered to  allow  the use  of  DSPSPLF2
                 based on the  maximum number of pages  parameter.  See
                 also  the   restrictions  for  when  DSPSPLF  is  used
                 automatically.

                 *NO  may  be  entered  to  always  cause  the  use  of
                 DSPSPLF.

   MAXPAGES      The default  is 100.   If the number  of pages in  the
                 spooled file  exceeds the value  specified, DSPSPLF is
                 used automatically.

   MAXSTS        The  maximum number of pages  in the spooled file that
                 must  exist   before   a   status  message   is   sent
                 explaining   the  use   of  CPYSPLF   which  is   used
                 internally by DSPSPLF2.

                 The  default is 25.   If DSPSPLF is  used based on the
                 other parameters, the MAXSTS value is ignored.

Creating a System Wide Solution for DSPSPLF2
--------------------------------------------

The Security  Officer  (or any  user  with *ALLOBJ  special  authority)
should do the following:

  1.   If you  already have  a user  library in  front of  QSYS on  the
       system portion of the library list, skip to step 5.

  2.   Create a special library such as QSYSCHANGE.

             CRTLIB   LIB(QSYSCHANGE) TEXT('Used for special +
                        objects ahead of QSYS') AUT(*USE)

       It  is  important  that  you  specify  AUT(*USE)  and  carefully
       control what  is placed  in  this library  as it  can  represent
       significant security  and integrity considerations.   Specifying
       AUT(*USE)  prevents  other  users  from  adding objects  to  the
       library.

  3.   Use  WRKSYSVAL  for QSYSLIBL  and  add the  library  you created
       ahead of QSYS.

  4.   Because the system portion  of the library list is set  when you
       begin the job, signoff and signon again.

       Do DSPLIBL  to ensure the library  is in front of  QSYS and then
       continue with Step 6.

  5.   Check  the library that is in front  of QSYS on the library list
       with EDTOBJAUT.   Ensure that  the *PUBLIC  has *USE  authority.
       This  allows them  access to  the library,  but prevents  adding
       objects  to  the  library.    Only  users with  *ALLOBJ  special
       authority should be allowed to  add objects because of  security
       and integrity reasons.

  6.   Duplicate  the DSPSPLF2  command  from  TAATOOL to  the  special
       library and rename it to DSPSPLF:

             CRTDUPOBJ  OBJ(DSPSPLF2) FROMLIB(TAATOOL) +
                          OBJTYPE(*CMD) TOLIB(xxxx) +
                          NEWOBJ(DSPSPLF)

  7.   Prompt  for CHGSPLF2 and  enter ALWUSE(*YES).   This  will force
       the use of the DSPSPLF2 function for your job.

  8.   Use  WRKSPLF and  the 'Display Spooled  File' option  for one of
       your  spooled files.    You  should  see the  DSPSPLF2  80  wide
       display.

  9.   See  the  next  section  on  changing the  shipped  defaults  if
       required.


Changing the Shipped Defaults
-----------------------------

The  defaults shipped  with the  tool cause  the following  values when
the TAADSPSPL2 data area is created in QTEMP.

           ALWUSE      *DEV78
           MAXPAGES    100
           MAXSTS      25

The Security Officer can change the defaults by doing the following:


       EDTAPPVAL   APPVAL(TAASECURE/DSPSPLF2)

and key over the existing values.

132 Wide Device Capability
--------------------------

When the  TAADSPSPL2  data  area is  created  in QTEMP,  the  TAA  Tool
RTVWSDA is used to  retrieve the device type.  The device  type is then
checked  against a list of  devices within the program  to determine if
the device is 132 wide capable.   A Y or N  is set in the data area  at
position 49.  This value is checked if ALWUSE is *DEV78 or *DEV.

The list of devices  within the program may not  be completely accurate
due to new devices or unknown capability.

If  you have a  device that  is not  properly recognized as  having 132
wide  capability, report  it to  the TAA  Productivity Tools  owner for
inclusion in  the next update.   Use  DSPDTAARA of QTEMP/TAADSPSPL2  to
see  the device  type accessed  by RTVWSDA.   It  will be  in positions
41-46 of the data area.

There  are two solutions  for including the  device so  it will operate
in 132 wide mode.

  **   You may  use  the CHGSPLF2  command  for  your job  and  specify
       DEV(*NO) to cause  the same function as if your  device had been
       recognized as being 132 wide capable.

  **   Change  the  code for  the  TAASPLWC2 program.    As  an *ALLOBJ
       special  authority  user,  use  CPYTAA  to  copy  the  TAASPLWC2
       source  from the  TAA  Archive  to  the QATTCL  source  file  in
       TAATOOL.   Use SEU to edit  the source.  Scan for  132WIDE.  You
       will  see  a series  of IF  commands.   Duplicate one  and enter
       your  device  type.    Re-create  the  program  in  TAATOOL  (no
       special parameters are needed on the CRTCLPGM command).

Creating a print width file of 78 bytes or less
-----------------------------------------------

If you  have your own printer  file, specify the  PAGESIZE parameter so
it is has a width of 78 or less.

If you  use QPRINT or one of the system  files, you must use an OVRPRTF
command and specify the PAGESIZE parameter.

The program that prints to the  file, must restrict itself to 78  bytes
or less.  It  is not necessary to specify a file length  of 78 or less,
but this  is a good practice  as a compiler (such  as RPG) will produce
an error if  there is a  print end  position that is  greater than  the
file width.

Restrictions
------------

  **   DSPSPLF2 checks the  TAADSPSPL2 data area in QTEMP  to determine
       if the  DSPSPLF2 function should  be used or  the system DSPSPLF
       command.   See  the discussion of  the CHGSPLF2  command for how
       the internal checking occurs.

  **   DSPSPLF  will automatically  be  used  if the  number  of  print
       lines exceeds 9,999 or the number of pages exceeds 1000.

  **   The device  types that  are recognized as  132 wide  capable may
       no be complete.  See the section on '132 Wide'.

Prerequisites
-------------

The following TAA Tools must be on your system:

     APPVAL          Application value
     FILEFDBCK       File feedback
     RTVWSDA         Retrieve workstation attributes
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

Implementation
--------------

None,  the  tool  is ready  to  use,  but to  implement  a  system wide
solution see  the  section on  'Creating  a  System Wide  Solution  for
DSPSPLF2'.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   DSPSPLF2      *CMD                   TAASPLW       QATTCMD
   CHGSPLF2      *CMD                   TAASPLW2      QATTCMD
   TAASPLWC      *PGM       CLP         TAASPLWC      QATTCL
   TAASPLWC2     *PGM       CLP         TAASPLWC2     QATTCL
   TAASPLWC9     *PGM       CLP         TAASPLWC9     QATTCL
   TAASPLWC12    *PGM       CLP         TAASPLWC12    QATTCL
   TAASPLWR      *PGM       RPG         TAASPLWR      QATTRPG
   TAASPLWD      *FILE      DSPF        TAASPLWD      QATTDDS

Structure
---------

DSPSPLF2    Cmd
   TAASPLWC   CL pgm
      CHGSPLF2   Command
      TAASPLWR   RPG Pgm
        TAASPLWD  Dsp file

CHGSPLF2    Cmd
   TAASPLWC2   CL pgm
     TAASPLWC9   CL pgm

TAASPLWC12 is the prompt override program for CHGSPLF2.
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top