9 106 GET_FILE_INFO

LANSA Technical

9.106 GET_FILE_INFO

Þ Note: Built-In Function Rules.

Retrieves a list of file related information from the LANSA internal database and returns it to the calling RDML function in variable length working lists.

Special Note: This Built-In Function provides access to very advanced facilities that basically allow RDML functions to construct new RDML functions.

This is a very specialized area that requires very good knowledge of the LANSA product. Use of this Built-In Function in a "commercial" application (e.g. Order Entry) is not normal and should not be attempted.

Þ This is a Specialized Built-In Function for use in a Development Environment only.

For use with

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

NO

 

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Physical file name

1

10

 

 

2

A

Req

Physical file library
(value ignored by CHECKFILE).
In Visual LANSA blanks are also validated for backward compatibility.

1

10

 

 

3

A

Req

Type of file related information to retrieve. Valid types are:

CHECKFILE – First library the file exists in.

FIELDS- Fields in the file

VIRTUALS – Virtual fields in the file.

PHYKEYS- Fields used as keys to the file.

LGLVIEWS- Logical views for the file.

ACCROUTES- Access routes for the file.

MLATTR- Multilingual attributes

1

10

 

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

OK = lists returned partially or completely filled. No more of this type of information exists for this file.

OV = lists returned completely filled, but more of this type of information than could fit in the list exists.

NR = details list was returned empty. (FIELDS/VIRTUALS return OK)

ER = File not found

2

2

 

 

2

L

Req

Header working list to contain file related information.

The calling RDML function must provide a working list with an aggregate entry length of exactly 100 bytes.

List cannot be more than:
32767 entries in Windows
9999 entries on IBM i.

 

From - To   Description

1 - 5   Number of the first entry in the detail list for this entry in character format. A value of '00000' denotes that there are no entries in the detail list for this entry.

6 - 10   Number of the last entry in the detail list for this entry in character format

11 - 100   Rest of information

For type CHECKFILE:
One header list entry formatted as follows:

From - To   Description

1 - 5   As above

6 - 10   As above

11 - 20   File name 

 

For type FIELDS:
One header list entry formatted as follows:

From - To   Description

1 - 5   As above

6 - 10   As above

 

For type VIRTUALS:
One header list entry  formatted as follows:

From - To   Description

1 - 5    As above

6 - 10   As above

 

For type PHYKEYS:
One header list entry is formatted as follows:

From - To   Description

1 - 5   As above

6 - 10   As above

 

For Type LGLVIEWS:
Each header list entry is formatted as follows:

From - To   Description

1 - 5   As above

6 - 10   As above

11 - 20   Logical view name

21 - 60   Logical view description

 

For type ACCROUTES :
Each header list entry is formatted as follows: 

From - To   Description

1 - 5   As above

6 - 10   As above

11 - 20   Access route name

21 - 60   Access route description

61 - 70   File accessed

71 - 80   File library accessed.

81 - 84 (P7,0) Maximum records expected.

 

For type MLATTR:
Each header list entry is formatted as follows:

From - To   Description

1 - 5   As above

6 - 10   As above

11 - 20   Logical view name or physical file name

100

 

100

 

 

 

 

 

 

 

 

0

 

 

 

 

 

0

 

 

 

 

 

 

 

0

 

 

 

 

 

0

3

L

Req

Detail working list to contain file related information.

The calling RDML function must provide a working list with an aggregate entry length of exactly 50 bytes.

For type CHECKFILE:
Single detail list entry is formatted as follows:
From - To   Description

1 - 10   First library name that the file exists in

For type FIELDS:
Each detail list entry is formatted as follows:
From - To   Description

1 - 10   Field name that is part of the file

For type VIRTUALS:
Each detail list entry is formatted as follows:
From - To   Description

1 - 10   Virtual field name that is part of the file

11 - 11   Virtual field populates real field on output (Yes/No/Unknown)

12 - 12   Real field populates virtual field on input (Yes/No/Unknown).

For type PHYKEYS:
Each detail list entry is formatted as follows:
From - To   Description

1 - 10   Field name that is part of the file key

For type LGLVIEWS:
Each detail list entry is formatted as follows:
From - To   Description

1 - 10    Field name that is part of the logical view key

For type ACCROUTES :
Each detail list entry is formatted as follows:
From - To   Description

1 - 20   Value that is used as a key in the access route.

For type MLATTR:
Each detail list entry is formatted as follows:
From - To   Description

1 - 4   Language code

5 - 44   Logical view or physical file description

 

50