Focal Point
Can I have an Alias for an Oracle table

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3541087122

April 04, 2007, 01:29 PM
JimmyD
Can I have an Alias for an Oracle table
Can I create an Alias that's different than the field name in a Master that points to an Oracle table?

I tried creating some Aliases in a master that points to an Oracle table and I receive an error message:
(foc1410) SQL COLUMN NOT FOUND (for table check for alias names)

The problem field is the 1st one - OPR_ID

Here is the master:
FILENAME=AMZRDTL, SUFFIX=SQLORA , $
SEGMENT=AMZRDTL, SEGTYPE=S0, $
FIELDNAME=OPR_ID, ALIAS=OPRID, USAGE=A4V, ACTUAL=A4V, $
FIELDNAME=BATCH_NBR, ALIAS=BATCH_NBR, USAGE=P10, ACTUAL=P5, $
FIELDNAME=SEQ_NBR, ALIAS=SEQ_NBR, USAGE=P5, ACTUAL=P3, $
FIELDNAME=CO_CODE, ALIAS=CO_CODE, USAGE=A1, ACTUAL=A1, $
FIELDNAME=BTA_NBR, ALIAS=BTA_NBR, USAGE=P10, ACTUAL=P5, $
FIELDNAME=STA_NBR, ALIAS=STA_NBR, USAGE=P10, ACTUAL=P5, $
FIELDNAME=INVC_NBR, ALIAS=INVC_NBR, USAGE=P19, ACTUAL=P10, $
FIELDNAME=DTL_NBR, ALIAS=DTL_NBR, USAGE=A4V, ACTUAL=A4V, $

here is the acx file:
SEGNAME=AMZRDTL, TABLENAME=ADMARC.DTL, CONNECTION=ADMDVH.sfchron.com,
GUI_PARAMS='0,100,24,148,72,278,160', KEYS=3, $

Thanks,
Jim
Unix Solaris
WebFocus 7.13
ETL 7.13
DS 7.14
Oracle 9.2
April 04, 2007, 01:49 PM
Francis Mariani
The ALIAS is the Oracle name, FIELDNAME is the WebFOCUS name. If you want to rename the column name, change FIELDNAME.

I can't think of a reason to do this really, except, perhaps, as hammo1j points out varchar vs tx fields , you would like two differently formatted columns for the same Oracle column.

My personal preference is to create Master and Access files with the synonym generator and then leave them untouched. You never know when you may need to recreate the synonyms and accidentally erase the customization.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 04, 2007, 02:07 PM
JimmyD
quote:
The ALIAS is the Oracle name, FIELDNAME is the WebFOCUS name. If you want to rename the column name, change FIELDNAME.

I can't think of a reason to do this really, except, perhaps, as hammo1j points out, you would like two differently formatted columns for the same Oracle column.

My personal preference is to create Master and Access files with the synonym generator and then leave them untouched. You never know when you may need to recreate the synonyms and accidentally erase the customization.

Francis


Thank you very much Francis. I was so close yet so far. To answer your question as to why we want to do this: We are moving our Billing system from Mainframe COBOL VSAM files to Unix, COBOL, Oracle tables. We have about 100 Mainframe Focus reports we need to move off the mainframe. Unfortunately, the Oracle table names are different and the field names are different but the Oracle tables match the VSAM tables as far as content. If I create the synonym name the same as the mainframe Focus Master and the fieldnames the same as the mainframe focus masters, we can just download most of these reports and they should run without any changes. Of course we will have to take out any mainframe VM system commands. When I modify these masters, I will make backup copies where users cannot find them. We're aware that someone can re-create the master and overwrite the fieldnames so we'll take caution of this.

Thanks agin, this really helps us a lot.
Jim
April 04, 2007, 02:09 PM
Francis Mariani
Jim,

Yours is a good reason for using different FIELDNAME and ALIAS.

Cheers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server