                        P D S B A T C H



      Batch utility PDSBATCH run in MVS environment and is useful to
manage members of partitioned libraries.
At the same time, linkable routine PDSUTIL can do the same functions,
making them available to any calling Cobol program (or Assembler).

      To use PDSBATCH, pass commands in PARM= parameters in EXEC
statement:

      //STEP1  EXEC PDSBATCH,PARM='function,member,optional.params'

library on which commands take effect must be specified in a DD statement
with logical name DDPDS:

      //DDPDS   DD   DSN=phisical.library.name,DISP=SHR

      SYSPRINT e SYSIN DD statements are mandatory.


Parameter 'function' can be one of this:

DIR     - in SYSPRINT is listed directory of the specified library;
          usually, to list complete directory nothing else is specified;
          If as 'member' is specified a name, listing start from the first
          name equal or from the next name; finally if a partial name
          followed by a '*' is specified, are listed only the name starting
          for this partial name. Star '*' can be used only at end of a name 
          and not at start or in the middle. If optional parameter
          'NOHEAD' is present, the list is not preceded by a header.
          Data listed are explained forward.

QUERY   - to verify if a member exist or not in library; if is present 
          Return code is 0 and in SYSPRINT are printed its features in the
          same way that command DIR; if member is not present, program
          ends with Return Code 4. With optional parameter 'NOHEAD',
          the data are not preceded by a header.

READ    - specified member is read an displayed in SYSPRINT.

WRITE   - read records in SYSIN and write it in specified member,
          overwriting it if already present. 
          To create a empty member, you can use write without specify
          any record in SYSIN. Is not possible add records at end of
          an existing member.

COPY    - specified member is read from library with logical name DDPDS
          and is written in output in library of logical name DDPDSOUT.
          So, you must specify DDPDSOUT DD with this library name.
          If you specify a second optional member name, copy is with a
          name change. This two DD, DDPDS and DDPDSOUT, can refer to the
          same library; in this case obviously is mandatory write the 
          output member name different from input. 

MOVE    - is equal to command COPY, but at end of copy process, input
          member is deleted.

DEL     - delete specified member in library  'DDPDS'

REN     - rename specified member with the mandatory second name written,
          always in library DDPDS.


      Printed data with commands 'DIR' and 'QUERY' are:
- Member name
- Show if a name is an Alias (in this case "A" is present) or not ("-")
- Length of User Area of the member ('Directory  User Data Length' = DUDL)
  if it is 30 bytes long, this area is decoded in following fields,
  if is 0 or different from 30, area is only dumped in hexadecimal.
  (For example, is 24 byes long for load library of record format 'U' )

  Following data (if DUDL=30) are the same showed by ISPF for a NOT
  load library:
- VV : PDF version number
- MM : PDF modification level
- CREATED : is the date (in eurapean format DD/MM/YY) in which member 
  has been created
- CHANGED : date and time of last member update
- SIZE : total number of lines
- INIT : number of lines of member at creation time
- MOD  : number of modified lines 
- USERID : name of the user that has done the last update

