5.12.7 Direct Exporting of Objects in a List
To export to a PC system
To export to an IBM i system
To directly invoke the export facility without using any of the normal LANSA menus or prompts when the target is a LANSA for i system, the LANSA EXPORT command may be used. This enables you to invoke an export 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 'EXPORT'
|
PROCESS
|
2 / A(10)
|
Not required - pass as blanks
|
FUNCTION
|
3 / A(10)
|
Not required - pass as blanks
|
PARM01
|
4 / A(7)
|
Name of previously defined list that specifies object(s) to be exported. The list must have a Target System Type of AS/400.
|
PARM02
|
5 / A(10)
|
Device or device file name if exporting to disk or magnetic tape. Otherwise pass as blanks.
|
PARM03
|
6 / A(21)
|
Save file name if exporting to a save file. Use qualified name form if desired, otherwise pass as blanks.
|
PARM04
|
7 / A(7)
|
File sequence number if device name used in PARM02. Default is *END if left blank.
|
PARM05
|
8 / A(3)
|
Omit RDML source code from exported data. Pass as 'YES' or 'NO'. Default is 'NO' if left blank.
|
PARM06
|
9 / A(256)
|
Languages to be exported. Up to 64 x 4 character language code(s) or *ALL to export all languages.
Only applicable to multilingual partitions.
|
PARM07
|
10 / A(3)
|
Not in use.
|
PARM08
|
11 / A(3)
|
Include LANSA/Document details in the export. Pass as 'YES' or 'NO'. Default is 'NO' if left blank.
This parameter will be set to 'NO' by the program if the 'Omit RDML source code from exported data' parameter is not passed as 'NO'.
|
PARM09
|
12 / A(3)
|
Omit frameworks and groups from the export. Pass as 'YES' or 'NO'. Default is NO if left blank.
|
PARM10
|
13 / A(1)
|
Not required - pass as blanks
|
PARTITION
|
14 / A(3)
|
Name of partition in which the list is defined.
|
LANGUAGE
|
15 / A(4)
|
Language that system is to use. If not specified, the partition default language will be assumed.
|
|
As an example consider the following operating system SBMJOB (submit job) command that begins an export job in batch:
SBMJOB RQSDTA('LANSA REQUEST(EXPORT) +
PARM01(LIST01) PARM02(QTAPE) PARTITION(DEV)')
This command will submit a job to batch. The batch job will then invoke LANSA and request that all objects defined in a list called LIST01 be exported out onto a device called QTAPE (presumably a tape drive). The list is defined in the DEV partition.
It is not recommended that this facility be used to export objects interactively (i.e. directly from a workstation) because of the relatively large number of database I/Os performed.
To export to a PC system
To directly invoke the export facility without using any of the normal LANSA menus or prompts when the target is a LANSA PC system, the LANSA PCEXPORT command may be used. This enables you to invoke an export 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 'PCEXPORT'
|
PROCESS
|
2 / A(10)
|
Not required - pass as blanks
|
FUNCTION
|
3 / A(10)
|
Not required - pass as blanks
|
PARM01
|
4 / A(7)
|
Name of previously defined list that specifies object(s) to be exported. The list must have a Target system type of WIN, PC or OS/2.
|
PARM02
|
5 / A(1)
|
Check Out Usage. This must be 'R' (read only) or 'M' (maintenance).
|
PARM03
|
6 / A(8)
|
Task identity. If the Check Out Usage is 'M' this must be a valid task with an open status (OPN or WRK).
If the Check Out Usage is 'R' (read only), this parameter is ignored (ie treated a blank).
|
PARM04
|
7 / A(10)
|
PC Name. If the Check Out Usage is 'M' this must be a valid PC Name.
If the Check Out Usage is 'R' (read only), this parameter is ignored (ie treated as blank).
|
PARM05
|
8 / A(1)
|
Not required - pass as blanks
|
PARM06
|
9 / A(1)
|
Not required - pass as blanks
|
PARM07
|
10 / A(1)
|
Not required - pass as blanks
|
PARM08
|
11 / A(1)
|
Not required - pass as blanks
|
PARM09
|
12 / A(1)
|
Not required - pass as blanks
|
PARM10
|
13 / A(1)
|
Not required - pass as blanks
|
PARTITION
|
14 / A(3)
|
Name of partition in which the list is defined.
|
LANGUAGE
|
15 / A(4)
|
Language that system is to use. If not specified, the partition default language will be assumed.
|
|
As an example consider the following operating system SBMJOB (submit job) command that begins an export to PC job in batch:
SBMJOB RQSDTA('LANSA REQUEST(PCEXPORT) +
PARM01(LISTPC) PARM02(M) PARM03(MYTASK01) PARTITION(DEV)')
This command will submit a job to batch. The batch job will then invoke LANSA and request that all objects defined in a list called LISTPC be exported. The export will create a folder in QDLS named LISTPC. The objects will be available for maintenance under task MYTASK01. The list is defined in the DEV partition.
It is not recommended that this facility be used to export objects interactively (i.e. directly from a workstation) because of the relatively large number of database I/Os performed.