Automating mass compilations in LANSA
| Date: | Archived |
|---|---|
| Product/Release: | LANSA for the AS/400 |
| Abstract: | Mass Compilation Example: Compiling I/O modules with observability intact, when moving from CISC to RISC. |
| Submitted By: | LANSA Technical Support |
In LANSA mass compilations of objects can be automated.
In this example the mass compilation I/O modules are demonstrated with observability intact. This is required if moving from CISC to RISC.
To compile a LANSA file use the following 2 BIFS :
- GET_PHYSICAL_LIST- Builds a list of physical files
- MAKE_FILE_OPERATIONL - Compiles a physical file
In this example the first BIF is used to display a list of LANSA files on the screen so that files can be selected to be re-compiled using the second BIF:
DEF_LIST NAME(#FILLST) FIELDS(#FILNAM #FILLIB #FILDES #SPARE) TYPE(*WORKING ENTRYS(nnn) CLR_LIST NAMED(#FILLST) REQUEST FIELDS(#STRTFL) "file to start from" USE BUILTIN(GET_PHYSICAL_LIST) WITH_ARGUMENTS(#STRTFL)TO_GET(#FILLST #LAST #RETCOD) IF COND(#RETCOD *EQ OK) OR (#RETCOD *EQ OV)') SELECTLIST NAMED(#FILLST) USE BUILTIN(MAKE_FILE_OPERATIONL) WITH_ARGS(#FILNAM #FILLIB "NNY" "" "" "" "" "" "" "N") TO_GET(#RETCOD) ENDSELECT ENDIF
For the MAKE_FILE_OPERATIONL BIF check the optional arguments for any additional requirements.
Note: The arguments to make the files operational could be variables. This would allow the alteration of the arguments at execution time.
This strategy could also be used if it is necessary to make files accessible to LANSA Client.
To compile processes and functions use the following BIFs :
- GET_PROCESS_LIST
- GET_FUNCTION_LIST
- COMPILE_PROCESS - Submits the job to compile the process and all selected functions.