How to make a HOLD file's FIELDNAME, TITLE and ALIAS the same name?

How to make a HOLD file's FIELDNAME, TITLE and ALIAS the same name?

book

Article ID: KB0070706

calendar_today

Updated On:

Products Versions
ibi WebFOCUS All versions

Description

Firstly we will check the behavior of the hold file created : 
  1. Login to WF-client.
  2. Open Application Directory , and make one new application directory "app02"
  3. Create one fex file containing the below code with the name "fex1.fex" :
    • DEFINE FILE CAR
    • COUNTRYOLD/A14=COUNTRY;
    • END
    • TABLE FILE CAR
    • SUM CAR
    • COUNTRYOLD AS COUNTRYNEW
    • BY COUNTRY
    • ON TABLE SET ASNAMES ON
    • ON TABLE SET HOLDLIST PRINTONLY
    • ON TABLE HOLD AS app02/carMaster1 FORMAT SQLMSS
    • END
    • -RUN
  4. Run this fex and you will notice "carMaster1" will be created inside app02 directory .
  5. (NOTE : in the above fex, SQLMSS format has been used by using legacy car master file)
  6. Right click on "carMaster1" > "Metadata management" > "edit as text 
  7. ***Notice that "FIELDNAME" and "TITLE" will be displayed as  "COUNTRYNEW" but the ALIAS will not.

Issue/Introduction

This article covers the instructions to make a HOLD file's FIELDNAME, TITLE and ALIAS the same name.

Environment

Windows and Linux

Resolution

- To make the FIELDNAME , TITLE and ALIAS the same add the following line to fex1.fex

ON TABLE SET HOLDATTRS CUBE

- Updated fex1.fex will look like this...
  • DEFINE FILE CAR
  • COUNTRYOLD/A14=COUNTRY;
  • END
  • TABLE FILE CAR
  • SUM CAR
  • COUNTRYOLD AS COUNTRYNEW
  • BY COUNTRY
  • ON TABLE SET ASNAMES ON
  • ON TABLE SET HOLDLIST PRINTONLY
  • ON TABLE SET HOLDATTRS CUBE
  • ON TABLE HOLD AS app02/carMaster1 FORMAT SQLMSS
  • END
  • -RUN 
- Now check the carMaster1 master file and you will notice that FIELDNAME, TITLE and ALIAS are all COUNTRYNEW.
​​​