LUTIL (RPGLE)

List Utilities
Details ....

Copybooks  

QSYSINC/QRPGLESRC,QUSEC
LUTIL_H
Linked List Utilities Prototypes
LLIST_H
Linked List Prototypes
OS_API_H
OS API Prototypes
USRSPC_H
User Space Data Structure and Prototypes
PARMEVAL_H
Parameter Evaluation Prototype
LIBC_H
C-Prototypes for RPG

Procedures  

lutil_listActiveSubsystemJobsexported
List Active Jobs in Subsystem
lutil_listDatabaseRelationsexported
List database relations
lutil_listFileMembersexported
List file member names
lutil_listJobLibraryListexported
List Job Library List
lutil_listJobsexported
List jobs
lutil_listObjectsexported
List objects
lutil_listRecordFormatsexported
List record format names

Detailed Description  

This module contains several procedures which uses the linked list procedures for storing simple data.
Author:
Mihael Schmidt
Date:
23.02.2008
Changes:
15.03.2008   —   Mihael Schmidt
added procedure lutil_listObjects

18.03.2009   —   Mihael Schmidt
added procedure lutil_listDatabaseRelations


Procedure Documentation  

lutil_listActiveSubsystemJobs  

Pointerlutil_listActiveSubsystemJobs(Character, Character)
All active jobs of the specified subsystem will be added to the list. The entries of the list are qualified job names which consist of the following parts:
  • CHAR (10) - Job Name
  • CHAR (10) - User Name
  • CHAR (6) - Job Number

Subsystem monitor jobs are exluded from the list.
Parameter:
Character (10)Subsystemdescription library
Character (10)Subsystemdescription name
Return value:
PointerPointer to list or *null if any error occured
Exported.
Author:
Mihael Schmidt
Date:
29.04.2008
Infos:
  The user calling this procedure must have *JOBCTL authorities else this procedure returns *null.

lutil_listDatabaseRelations  

Pointerlutil_listDatabaseRelations(Character, Character)
All database relations (logical files, views and indices) are added to the list. This list is returned to the caller. On any error *null is returned. If the file does not exist *null is returned. If the file has no relations an empty list is returned.

The entries in the list have the following format:
  • 10A File name
  • 10A Library name
Parameter:
Character (10)Library name
Character (10)File name
Return value:
Pointerpointer to list or *null if any error occurs
Exported.
Author:
Mihael Schmidt
Date:
19.03.2009

lutil_listFileMembers  

Pointerlutil_listFileMembers(Character, Character)
All member names of a file are placed into a linked list. This list is returned to the caller. On any error *null is returned.
Parameter:
Character (10)Library name
Character (10)File name
Return value:
Pointerpointer to list or *null if any error occurs
Exported.
Author:
Mihael Schmidt
Date:
23.02.2008

lutil_listJobLibraryList  

Pointerlutil_listJobLibraryList(Character, Character, Integer)
All libraries of the library list of the specified job will be added in the order of the library list returned in a linked list.

The qualified job name consists of the following parts:
  • CHAR (10) - Job Name
  • CHAR (10) - User Name
  • CHAR (6) - Job Number

If both parameters are passed then the library list of the job with the qualified job name will be retrieved.
Parameter:
Character (26)Qualified Job Name (optinal, default = current job)
Character (16)Internal Job Number (optinal)
Numeric (Integer) (10)Library parts (see LUTIL_C)
Return value:
PointerPointer to list or *null if any error occured
Exported.
Author:
Mihael Schmidt
Date:
10.04.2008

lutil_listJobs  

voidlutil_listJobs(Character, Character, Character)
Returns a list of qualified job names which matches the passed parameters.

The qualified job name consists of the following parts:
  • CHAR (10) - Job Name
  • CHAR (10) - User Name
  • CHAR (6) - Job Number


Valid values for the job status are : *ACTIVE, *JOBQ, *OUTQ, *ALL.
Parameter:
Character (26)Qualified job name
Character (10)Job status (default: *ALL)
Character (4)Active job status (optional)
Exported.
Author:
Mihael Schmidt
Date:
16.04.2009
Infos:
  For valid values for the parameters look at the i5/OS API QUSLJOB and QUSRJOBI.

lutil_listObjects  

Pointerlutil_listObjects(Character, Character, Character)
All object names are placed into a linked list. This list is returned to the caller. On any error *null is returned.

The entries in the list have the following format:
  • 10A Library name
  • 10A Object name
  • 10A Object type


As this procedure utilizes the QUSLOBJ i5/OS API the parameters here accept the same names and generic names for library, name and object type.
Parameter:
Character (10)Library
Character (10)Object name (default: *all)
Character (10)Object type (default: *all)
Return value:
PointerPointer to list or *null if any error occured
Exported.

lutil_listRecordFormats  

Pointerlutil_listRecordFormats(Character, Character)
All record format names of a file are placed into a linked list. This list is returned to the caller. On any error *null is returned.
Parameter:
Character (10)Library name
Character (10)File name
Return value:
PointerPointer to list or *null if any error occured
Exported.
Author:
Mihael Schmidt
Date:
25.02.2008