5.12.8 Direct Importing of Objects
5.12.4 Steps to Import Objects describes how a job can be submitted from within LANSA to import all objects from optical device, magnetic tape or save file.
However, it is possible to directly invoke the import facility without using any of the normal LANSA menus or prompts.
This enables you to invoke an import job at any time and from any type of application program.
To do this, use the LANSA command, or place a call to the LANSA program passing parameters / arguments as described below:
Command Parameter |
Call Argument Number / Type |
Description |
REQUEST |
1 / A(10) |
Pass as 'IMPORT' |
PROCESS |
2 / A(10) |
Not required - pass as blanks |
FUNCTION |
3 / A(10) |
Not required - pass as blanks |
PARM01 |
4 / A(10) |
Device or device file name if importing from optical device or magnetic tape. Otherwise pass as blanks. |
PARM02 |
5 / A(21) |
Save file name if importing from a save file. Use qualified name form if desired. Otherwise pass as blanks. |
PARM03 |
6 / A(10) |
Name of message queue to which messages and inquiries are to be sent. |
PARM04 |
7 / A(6) |
Source system type. AS/400. |
PARM05 |
8 / A(80) |
Tape File sequence number or optical file name if device name used in PARM01. Default for tape device is *SEARCH if left blank. The optical device name can be up to 80 characters long. |
PARM06 |
9 / A(1) |
Import all languages in exported data. Either Y (Yes) or N (No). Only applicable to multilingual partitions. |
PARM07 |
10 / A(256) |
Languages to be imported. Up to 64 x 4 character language code(s) or *ALL to import all languages in list. Only applicable to multilingual partitions. |
PARM08 |
11 / A(4) |
Default language. Default is the current language if left blank. Only applicable to multilingual partitions. |
PARM09 |
12 / A(6) |
Characters 1-3 Characters 4-6 |
PARM10 |
13 / A(19) |
Characters 1-10. Reserved. Leave blank. Characters 11-13. Allow Name Changes. Characters 14-16. Allow Type Changes. Characters 17-19. Omit importing frameworks and groups. Pass as 'YES' or 'NO'. Default is NO if left blank. |
PARTITION |
14 / A(3) |
Name of partition into which objects are to be imported. |
LANGUAGE |
15 / A(4) |
Language that system is to use. If not specified, the partition default language will be assumed. |
Consider the following examples:
Example 1
Using CMD to submit the job. Note that PARM02 and PARM04 have single quotes:
SBMJOB CMD(LANSA REQUEST(IMPORT) PARM02('QGPL/EXPWEB1') PARM03(QSYSOPR) PARM04('AS/400') PARM06(N) PARM07(*ALL) PARM08(ENG) PARM09(YESYES) PARTITION(MX1)) JOB(TEST1) OUTQ(*CURRENT)
Example 2
Using RQSDTA to submit the job. Note that PARM02 and PARM04 have TWO single quotes:
SBMJOB rqsdta('LANSA REQUEST(IMPORT) PARM02(''QGPL/EXPWEB1'') PARM03(QSYS OPR) PARM04(''AS/400'') PARM06(N) PARM07(*ALL) PARM08(ENG) PARM09(YESYES) PARTITION(MX1)') JOB(TEST1) OUTQ(*CURRENT)
This command will submit a job to batch. The batch job will then invoke LANSA and import all objects on the save file, MYSAVF, into multilingual partition DEV. New internal names will be created.
It is not recommended that this facility be used to import objects interactively (i.e. directly from a workstation) because of the relatively large number of database I/Os performed.