TAA Tools
CVTSPLNAPI      CONVERT SPLNBR TO API                  TAASPMC

The  Convert Spooled  File Number  to  API command  converts  a 5  byte
character SPLNBR  value (such as *LAST) to a  4 byte character variable
containing  a binary  number required by  the spool APIs.   The command
converts  the  special values  *LAST  or  *ONLY  as  well  as  specific
spooled file  numbers.  The command  is useful when  dealing with spool
APIs.

A typical use would be as follows:

             DCL          &RTNAPIVAL *CHAR LEN(4)
              .
             CVTSPLNAPI   SPLNBR(*LAST) RTNAPIVAL(&RTNAPIVAL)
              .
             CALL         QUSRSPLA PARM(... &RTNAPIVAL)

Command parameters                                    *CMD
------------------

   SPLNBR        The  spooled file number  to be converted.   The value
                 is  typically a  5  byte  character  value.    It  may
                 contain *ONLY, *LAST, or a 4 digit number.

   RTNAPIVAL     The return value  intended for an API  using a spooled
                 file   number  parameter.     The  variable   must  be
                 declared as  *CHAR LEN(4)  and will  contain a  binary
                 number.    *ONLY   is  converted  to  0.     *LAST  is
                 converted to -1.

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

Because the  command returns a  variable, it may  only be used  in a CL
program.

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

None.

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

None, the tool is ready to use.

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

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

   CVTSPLNAPI    *CMD                   TAASPMC       QATTCMD
   TAASPMCC      *PGM       CLP         TAASPMCC      QATTCL
					

Added to TAA Productivity tools January 1, 1998


Home Page Up to Top