SIMPLE LANSA TEMPLATE

Dumps file fields as comments
(from here you can modify to build group by ect..)

/* ********** ======================================================= */ /* ********** GET NAME OF JUST ONE PHYSICAL FILE */ /* ********** ======================================================= */ @@GET_FILS TO(1) PROMPT('Enter the name of the PHYSICAL file to be used by this template') EXTEND('The file name may be specified in full, partially (to cause a partial list' 'of available files to be displayed) or left blank (to cause a full list of' 'available files to be displayed). When a list of files is displayed, the' 'file required may be selected from the list.' ' ' 'Use the HELP function key for more details about this template and' 'examples of the type of RDML applications it can create.') HELPIDS(HELP010 HELP020 HELP030 HELP040 HELP050) @@COMMENT COMMENT('=======================================================') @@COMMENT COMMENT(' Simple File Dump ') @@COMMENT COMMENT(' ') @@COMMENT COMMENT(' @@FNAME01 - Field List ') @@COMMENT COMMENT(' ') @@COMMENT COMMENT(' Template - Z_Filedump ') @@COMMENT COMMENT(' ') @@COMMENT COMMENT(' FILE INFO ') @@COMMENT COMMENT(' @@FLIBR01 - File Library ') @@COMMENT COMMENT(' @@FVERS01 - File Version No ') @@COMMENT COMMENT(' @@FTYPE01 - File Type ') @@COMMENT COMMENT(' @@FNAME01 - File Name ') @@COMMENT COMMENT('=======================================================') /* ********** ======================================================= */ /* ********** GET FIELDS OF CHOSEN FILE INTO LIST 1 */ /* ********** ======================================================= */ @@CLR_LST NUMBER(1) @@RTV_FLDS FROM_FILE(1) INTO_LST(1) /* ********** ======================================================= */ /* ********** GET KEYS OF CHOSEN FILE INTO LIST 2 */ /* ********** ======================================================= */ @@CLR_LST NUMBER(2) @@RTV_KEYS OF_FILE(1) INTO_LST(2) /* ********** ======================================================= */ /* ********** GET USER TO CHOOSE FIELDS TO APPEAR ON PANEL */ /* ********** AND PUT RESULTS INTO LIST 3 */ /* ********** ======================================================= */ @@CLR_LST NUMBER(3) @@MAK_LSTS FROM_LSTS(1) FORCE_LSTS(2) INTO_LSTS((3 'Fields to' 'Appear in' 'Comments ' *SEQUENCE *ALL)) HELPIDS(HELP010 HELP020 HELP030 HELP040 HELP050) @@COMMENT 'Function control options' @@SET_IDX IDX_NAME(DP) TO(1) @@SET_IDX IDX_NAME(KF) TO(1) K30: @@LABEL @@CMP_IDX IDX_NAME(KF) IDX_VALUE(@@LNE03) IF_GT(K40) @@COMMENT COMMENT('#@@LEL03KF TYPE(@@LTP03KF) @@LDS03KF @@LAT03KF') @@INC_IDX IDX_NAME(DP) @@INC_IDX IDX_NAME(KF) @@GOTO LABEL(K30) K40: @@LABEL /* ********** ======================================================= */ /* ********** CLEAR ALL LISTS USED */ /* ********** ======================================================= */ @@CLR_LST NUMBER(1) @@CLR_LST NUMBER(2) @@CLR_LST NUMBER(3)