You can execute export and import operations in an unattended mode on your LANSA Composer Server. To do so:
- On an IBM i server, you use the COMPOSER command;
- On a Windows server, you use the dxstart.exe program.
Refer to the following headings for more information:
Check the Result of an Unattended Export or Import Operation
Unattended Export
To perform an unattended export on your LANSA Composer Server you must use an Export List that you have already defined through the LANSA Composer client for the purpose. The COMPOSER command or the dxstart.exe program requires you to specify the name of the export list and the path to the export file to be created.
If the export file already exists, the export operation will replace it. On IBM i servers, LANSA Composer will create the file with CCSID 1208.
Example 1: Use the COMPOSER command on an IBM i server to export LANSA Composer definitions specified by the export list MY_EXPORT_LIST:
<pgmlib>/composer request(EXPORT)
exportlist(MY_EXPORT_LIST)
exportto('/LANSA_Composer_licpgmlib/lic/MY_EXPORT001.dxexport')
Example 2: Use the dxstart.exe program on a Windows server to export LANSA Composer definitions specified by the export list MY_EXPORT_LIST:
dxstart.exe /request=dxexport /exportlist=MY_EXPORT_LIST /exportto="C:\MY_EXPORT001.dxexport"
Unattended Import
To perform an unattended import on your LANSA Composer Server you must have a suitable export file present in a file system location accessible from the server. The COMPOSER command or the dxstart.exe program requires you to specify the path to the export file from which the definitions are to be imported. All definitions in the export file will be imported – you do not have the opportunity (as you do in the LANSA Composer client) of selecting the definitions you wish to import.
Example 1: Use the COMPOSER command on an IBM i server to import the LANSA Composer definitions contained in the specified export file:
<pgmlib>/composer request(IMPORT)
importfrom('/LANSA_Composer_licpgmlib/lic/MY_EXPORT001.dxexport')
Example 2: Use the dxstart.exe program on a Windows server to import the LANSA Composer definitions contained in the specified export file:
dxstart.exe /request=dximport /importfrom="C:\MY_EXPORT001.dxexport"
Export and Import Options
When export and import operations are run in this way, LANSA Composer uses default values for all Export and Import Options. Any options specified in the LANSA Composer client do not apply.
Check the Result of an Unattended Export or Import Operation
When you perform an unattended export or import operation, LANSA Composer records an export or import log (and audit trail) in the same way as for an export or import operation run through the LANSA Composer client. Using the LANSA Composer client:
- You can display or print logs for any or all completed export operations at any time by selecting Export in the Navigator and then clicking the History tab.
From the History tab, you can also print an Export Manifest that lists all exported items along with their last-changed dates, times and users. This can be used to compare with last-changed details shown in LANSA Composer for selected items on their Audit tab.
- You can display or print logs for any or all completed import operations at any time by selecting Import in the Navigator and then clicking the History tab.
From the History tab, you can also print an Import Manifest that lists all imported items along with their last-changed dates, times and users. This can be used to compare with last-changed details shown in LANSA Composer for selected items on their Audit tab.