Please enable JavaScript to view this site.

Manual InterForm400 English 2023

Multiple Export Libraries (MEL) feature

 

Description

By default InterForm 400 only allows you to export resources to a library named APFEXPORT. The purpose of the MEL feature is to allow developers to export resources to other libraries as well.

 

Activation/deactivation

To activate MEL you create a data area (of any type) named APFEXPORT in library APF3812. To deactivate MEL simply delete the data area APF3812/APFEXPORT.

 

Usage

When MEL is activated the F10=Select export library command key will be enabled and option 6.Delete export library APFEXPORT will be removed from the InterForm 400 export menu.

 

At the InterForm400 export menu press F10 and overwrite APFEXPORT with another name (in the Export library field) to select another library to be used for export. All options at the InterForm400 export menu will now work on objects in this library.

 

Once you use option 1. Create export library with empty files all necessary InterForm400 work files (and a data area named EXPORTLIB) will be created in the specified library. Note: If the library does not exist it will be created.

 

IMPORTANT: Libraries created using option 1. Create export library with empty files at the InterForm400 export menu CAN NOT be used after a release upgrade of InterForm400.

 

 

Examples

 

Example 1: Copy all resources from the CUSTINVLIB/EXPORT.INV save file to the import library APFIMPORT and then transfer all resources to production (the InterForm400 system):

 

IMPAPFRSC SAVF(CUSTINVLIB/EXPORT.INV)

 

Example 2: Copy all resources from the CUSTINVLIB/EXPORT.INV save file to the import library APFIMPORT and then prompt the user whether to transfer all resources to production (the InterForm400 system):

 

IMPAPFRSC SAVF(CUSTINVLIB/EXPORT.INV) TFRPROD(*PROMPT)

 

Example 3: Copy all resources from the CUSTINVLIB/EXPORT.INV save file to the import library APFIMPORT and then transfer all resources to production (the InterForm400 system). In case of an error no display is shown:

 

IMPAPFRSC SAVF(CUSTINVLIB/EXPORT.INV) DSPERR(*NO)

 

Escape messages:

CPF9801 Object &2 in library &1 not found.

CPF9810 Library &1 not found.

APF9801 Error code &1 loading InterForm400 resources.

 

Possible error codes for message APF9801:

 

Error code

Description

IMP0001

The InterForm APFIMPORT library can not be used.

IMP0002

The InterForm import library APFIMPORT is in use.

IMP0003

The InterForm import library APFIMPDST already exists.

IMP0004

Error installing the InterForm import library APFIMPORT.

IMP0005

Error installing the InterForm import library APFIMPDST.

IMP0006

One or more InterForm resources was not transferred to production.

 

 

Sample scenario of using MEL and the IMPAPFRSC command

 

Two developer teams at the same System i are using InterForm400 to enhance printouts:

TEAM A are designing a French invoice named INV003 in the file set FRINV for customer A

TEAM B are designing a Danish credit note named CRE002 in the file set DKINV for customer B.

 

Then TEAM A and TEAM B both need to distribute their overlays to the customers:

First TEAM A creates a library named TEAMA and export the overlay INV003 from file set FRINV.

Then TEAM A creates a distribution (a save file) named EXPORT.INV in library TEAMA

At the same time TEAM B creates a library named TEAMB and export the overlay CRE002 from file set DKINV and creates a distribution (a save file) named EXPORT.CRE in library TEAMB.

 

 

The TEAMA/EXPORT.INV save file can now be sent to customer A, and the TEAMB/EXPORT.CRE save file can now be sent to customer B.

 

Restoring the savefile TEAMA/EXPORT.INV at customer A's site and running the APFIMPRSC command will import the INV003 overlay to customer A's system.

 

Likewise:

Restoring the savefile TEAMB/EXPORT.CRE at customer B's site and running the APFIMPRSC command will import the CRE002 overlay to customer B's system.

 

The CL program to restore the overlay at customer A's site might look like this:

 

PGM

RSTLIB LIB(TEAMA) DEV(TAP01)

APF3812/IMPAPFRSC SAVF(TEAMA/EXPORT.INV)

ENDPGM