How to customize Spool File default pages if no WEB partition and language 'ENG' exist

Date:1 May 2007
Product/Release:LANSA for the Web
Abstract:Customizing Spool File default pages when you do not have a partition named 'WEB' and language 'ENG' for the iSeries.
Submitted By:LANSA Technical Support

Description:

LANSA ships default pages for spool files named STDPRINT, STDREPORT and STDREPORTLIST. You can have customized pages simply by having files with "MY_" as prefix to it. e.g. MY_STDPRINT. However when using these spool file pages they are required to be served from the partition 'WEB' with language 'ENG' of your LANSA system.

This tip will outline the procedure taken to customize Spool File default pages using SQL for systems that do not have a WEB partition and language ENG in the LANSA system.

Solution:

The following example is a scenario where a DEV partition with language ENG (English) exists and there is no WEB partition in the LANSA system. The DC@X01 and DC@X02 files exist in the LANSA data library DEVDTALIB.

  1. Update the XML Page Header file, DC@X01, so that records are converted from partition WEB to that of your partition.
UPDATE DEVDTALIB/DC@X01 SET
X01P#I='DEV' WHERE
X01P#I='WEB' AND
X01PEN='HTM' AND
(X01PAG='STDPRINT' OR X01PAG='STDREPORT' OR
X01PAG='STDREPORTLIST' OR X01PAG='MY_STDPRINT' OR
X01PAG='MY_STDREPORT' OR X01PAG='MY_STDREPORTLIST'
  1. Update the XML Page Detail file, DC@X02, so that records are converted from partition WEB with language ENG to that of your partition and language.
UPDATE DEVDTALIB/DC@X02 SET
X02P#I='DEV', X02PLN='ENG'  WHERE
X02P#I='WEB' AND X02PLN='ENG' AND
X02PEN='HTM' AND
X02PAG='STDPRINT' OR X02PAG='STDREPORT' OR
X02PAG='STDREPORTLIST' OR X02PAG='MY_STDPRINT' OR
X02PAG='MY_STDREPORT' OR X02PAG='MY_STDREPORTLIST')
  1. Using the LANSA Editor, you should are now able to edit these pages accordingly.  Remember when customizing these standard pages to use MY_ as the prefix to the default pages.
  1. Once satisfied with your changes then copy DC@X01 records of the partition and language back to have WEB partition and ENG language records.
UPDATE DEVDTALIB/DC@X01 SET
X01P#I='WEB' WHERE
X01P#I='DEV' AND
X01PEN='HTM' AND
X01PAG='STDPRINT' OR X01PAG='STDREPORT' OR
X01PAG='STDREPORTLIST' OR X01PAG='MY_STDPRINT' OR
X01PAG='MY_STDREPORT' OR X01PAG='MY_STDREPORTLIST')
  1. Likewise revert the page changes from your partition and language back to the WEB ENG records.
UPDATE DEVDTALIB/DC@X02 SET
X02P#I='WEB', X02PLN='ENG'  WHERE
X02P#I='DEV' AND X02PLN='ENG' AND
X02PEN='HTM' AND
(X02PAG='STDPRINT' OR X02PAG='STDREPORT' OR
X02PAG='STDREPORTLIST' OR X02PAG='MY_STDPRINT' OR
X02PAG='MY_STDREPORT' OR X02PAG='MY_STDREPORTLIST')

You should now be able to execute new spool file pages.