9 45 DELETE_PROCESS

LANSA Technical

9.45 DELETE_PROCESS

Þ Note: Built-In Function Rules.

Submits a job to delete a process and all of its functions.

Argument values are exactly as the information input on the "Delete a Process" screen described in Submitting the Job to Delete a Process Definition in the LANSA for i User Guide.

Þ 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 delete process and does not return control until the delete is complete.

Visual LANSA for Linux

NO

 

 

 

Arguments for Visual LANSA

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Process name

1

10

 

 

2

A

Opt

Name of job

Ignored

1

10

 

 

3

A

Opt

Name of job description

Ignored

1

21

 

 

4

A

Opt

Name of job queue

Ignored

1

21

 

 

5

A

Opt

Name of output queue

Ignored

1

21

 

 

 

 

Arguments for LANSA for i

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Process name

1

10

 

 

2

A

Opt

Name of batch job

Default: Process name

1

10

 

 

3

A

Opt

Name of job description

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

1

21

 

 

4

A

Opt

Name of job queue

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

1

21

 

 

5

A

Opt

Name of output queue

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

1

21

 

 

 

 

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 case of "ER" return code error message(s) are issued automatically.

2

2

 

 

 

 

Example

A user wants to control the deletion of processes using their own version of the "Delete a Process" facility.

*********  Define arguments
DEFINE     FIELD(#PROCES) TYPE(*CHAR) LENGTH(10)
DEFINE     FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
*********  Request Process
BEGIN_LOOP     
REQUEST    FIELDS(#PROCES)
*********  Execute built-in-function - DELETE_PROCESS
USE        BUILTIN(DELETE_PROCESS) WITH_ARGS(#PROCES) TO_GET(#RETCOD)
 

*********  Check if submission was successful

IF         COND('#RETCOD *EQ ''OK''')
MESSAGE    MSGTXT('Delete Process submitted successfully')
CHANGE     FIELD(#PROCES) TO(*BLANK)
ELSE     
MESSAGE    MSGTXT('Delete Process submit failed with errors, 
           refer to additional messages')
ENDIF     
END_LOOP