9 20 COMPILE_PROCESS

LANSA Technical

9.20 COMPILE_PROCESS

Þ Note: Built-In Function Rules.

Compiles a process and all selected functions.

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

For use with

LANSA for i

YES

Do not use on IBM i in an RDMLX partition.
LANSA for i submits a job to batch as a separate task.

Visual LANSA for Windows

YES

Visual LANSA initiates the compile process and does not return control until the compile is complete.

Visual LANSA for Linux

NO

 

 

 

Arguments for Visual LANSA

No

Type

Req/ Opt

Visual LANSA Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Process name

1

10

 

 

2

L

Req

Working list to contain function names. The calling RDML function must provide a working list with an aggregate entry length of exactly 7 bytes.

If you do not wish to specify any functions for compilation then you must pass an empty working list.

1

7

 

 

3

A

Opt

Name of job

Ignored

1

10

 

 

4

A

Opt

Name of job description

Ignored

1

21

 

 

5

A

Opt

Name of job queue

Ignored.

1

21

 

 

6

A

Opt

Name of output queue

Ignored.

1

21

 

 

7

A

Opt

Force compile of the process. This option forces the process to be rebuilt. If this option is NO, the process may still be compiled if changes have been made since it was last compiled. Functions are not affected. Functions are always compiled. 

Default NO.

2

3

 

 

8

A

Opt

Produce RDML source listing?

Ignored.

2

3

 

 

9

A

Opt

Produce RPG & DDS source listings?

This option is treated as the Keep Source option in LANSA/PC.

2

3

 

 

10

A

Opt

Optimize compiled program(s)?

Ignored.

2

3

 

 

11

A

Opt

Ignore decimal data errors in program(s)?

Ignored.

2

3

 

 

12

A

Opt

Allow debug / Remove Program observability?

Only the first character is checked. If this is Y then debug is enabled. Default Y

6

6

 

 

13

A

Opt

Dump code generator work areas?

Ignored.

2

3

 

 

14

A

Opt

Produce Documentor details?

Ignored.

2

2

 

 

15

A

Opt

Generate HTML pages?

YES = Generate HTML pages

NO  =  Do not generate HTML pages

Default : YES

Note: This argument is only applicable to Web enabled processes.

2

3

 

 

16

A

Opt

Generate HTML editor extension details?

This option is treated the same as "Validate Numeric Values"

YES = Generate details to support HTML editor extension.

NO = Do not generate details.

Note: This argument is only applicable to web enabled processes.

If this option is YES, the Generate HTML Pages option must also be YES.

2

3

 

 

17

A

Opt

Generate XML?

YES = Generate XML

NO  = Do not Generate XML

Default: YES

Note: This argument is only applicable to XML enabled processes

2

3

 

 

 

 

Arguments for LANSA for i

No

Type

Req/ Opt

LANSA for i Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Process name

1

10

 

 

2

L

Req

Working list to contain function names. The calling RDML function must provide a working list with an aggregate entry length of exactly 7 bytes.

If you do not wish to specify any functions for compilation then you must pass an empty working list.

Each returned list entry is formatted as follows:

Bytes 1-7: Function name

1

7

 

 

3

A

Opt

Name of batch job

Default: Process name

1

10

 

 

4

A

Opt

Name of job description

Default: the job description from the requesting job's attributes.

1

21

 

 

5

A

Opt

Name of job queue

Default: the job queue from the requesting job's attributes.

1

21

 

 

6

A

Opt

Name of output queue

Default: the output queue from the requesting job's attributes.

1

21

 

 

7

A

Opt

Compile process as well as functions?

YES = compile process

NO = do not compile process

Default: the "compile process default" value at position 461 in the system definition data area DC@A01. See Note

2

3

 

 

8

A

Opt

Produce RDML source listing?

YES = produce RDML listing

NO = do not produce listing

Default: the "source listing default" value at position 146 in the system definition data area DC@A01.

2

3

 

 

9

A

Opt

Produce RPG & DDS source listings?

YES = produce RPG & DDS listings

NO = do not produce listings

Default: the "source listing default" value at position 146 in the system definition data area DC@A01. See Note

2

3

 

 

10

A

Opt

Optimize compiled program(s)?

YES = optimize program(s)

NO = do not optimize

Default: the "optimize compile default" value at position 147 in the system definition data area DC@A01. See Note

2

3

 

 

11

A

Opt

Ignore decimal data errors in program(s)?

YES = ignore decimal data errors

NO = do not ignore errors

Default: the "decimal data error default" value at position 148 in the system definition data area DC@A01. See Note

2

3

 

 

12

A

Opt

Allow debug / Remove Program observability?

YESYES = Allow program(s) to be used in debug and do not remove observability.

NO NO = Do not allow debug and remove program observability

NO YES = Do not allow debug but do not remove the programs observability.

Default: the "enable debug default" value at position 400 in the system definition data area DC@A01.

Warning: Do not specify YESNO for this parameter. The DEBUG facility cannot work if a program is not observable.

6

6

 

 

13

A

Opt

Dump code generator work areas?

YES = Dump work areas

NO = Do not dump work areas

Default: YES

2

3

 

 

14

A

Opt

Produce Documentor details?

YES = Produce Documentor details

NO = Do not produce Documentor details

Default: YES if Documentor is enabled at the partition level, otherwise NO.

2

2

 

 

15

A

Opt

Generate HTML Pages?

YES = Generate HTML pages

NO  =  Do not generate HTML pages

Default : YES

Note: This argument is only applicable to Web enabled processes.

2

3

 

 

16

A

Opt

Validate numerics

YES = Generate details to support HTML editor extension.

NO = Do not generate details.

Note: This argument is only applicable to web enabled processes.

If this option is YES, the Generate HTML Pages option must also be YES.

2

3

 

 

17

A

Opt

Generate XML?

YES = Generate XML

NO  = Do not Generate XML

Default: YES

Note: This argument is only applicable to XML enabled processes

2

3

 

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code
OK = successful submission.
ER = argument details are invalid or an authority problem has occurred. In this case, return code error message(s) are issued automatically.

2

2

 

 

 

 

Notes for LANSA for i Arguments

 No

 

9

Produce RPG & DDS source listings?
Default: the "source listing default" value at position 146 in the system definition data area DC@A01.
Review this default setting via the Compile process option in Work with Compile and Edit Settings in the Review Systems setting facility.

10

Optimize compiled program(s)?
Default: the "optimize compile default" value at position 147 in the system definition data area DC@A01.
Review this default setting via the Produce source listing option in Work with Compile and Edit Settings in the Review Systems setting facility.

11

Ignore decimal data errors in program(s)?
Default: the "decimal data error default" value at position 148 in the system definition data area DC@A01.
Review this default setting via the Ignore Decimal data errors in RPG option in Work with Compile and Edit Settings in the Review Systems setting facility.

 

 

Example

A user wants to control the compilation of processes and functions using their own version of the "Compile / Re-Compile a Process" facility.

*********  Define arguments and lists
DEFINE     FIELD(#PROCES) TYPE(*CHAR) LENGTH(10)
DEFINE     FIELD(#FUNCTN) TYPE(*CHAR) LENGTH(7)
DEFINE     FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
DEF_LIST   NAME(#WKFUNL) FIELDS((#FUNCTN)) TYPE(*WORKING)
DEF_LIST   NAME(#BWFUNL) FIELDS((#FUNCTN))
*********  Clear working and browse lists
BEGIN_LOOP     
CLR_LIST   NAMED(#WKFUNL)
INZ_LIST   NAMED(#BWFUNL) NUM_ENTRYS(10) WITH_MODE(*CHANGE)
*********  Request Process and Functions
REQUEST    FIELDS(#PROCES) BROWSELIST(#BWFUNL)
*********  Move Functions from the browselist to the working list
SELECTLIST NAMED(#BWFUNL)
ADD_ENTRY  TO_LIST(#WKFUNL)
ENDSELECT     
*********  Execute built-in-function - COMPILE_PROCESS
USE        BUILTIN(COMPILE_PROCESS) WITH_ARGS(#PROCES #WKFUNL) TO_GET(#RETCOD)
*********  Check if submission was successful
IF         COND('#RETCOD *EQ ''OK''')
MESSAGE    MSGTXT('Compile Process submitted successfully')
CHANGE     FIELD(#PROCES) TO(*BLANK)
ELSE     
MESSAGE    MSGTXT('Compile Process submit failed with errors, refer to additional messages')
ENDIF     
END_LOOP