× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Buck,

Sorry, I did misunderstand what you wanted.

The only way (in SQL) that I know of to give a column two names is on the
CREATE TABLE statement. Have you considered creating views for them? It
would be trivial to create a tool that generates the necessary SQL statement
for each table.


John Taylor


> -----Original Message-----
> From: midrange-l-admin@midrange.com
> [mailto:midrange-l-admin@midrange.com]On Behalf Of Buck Calabro
> Sent: Friday, August 24, 2001 7:22 AM
> To: midrange-l@midrange.com
> Subject: RE: DDS ALIAS keyword
>
>
> >> Is there any way except DDS to put an alias on a field?
>
> >You can use SQL. The "LABEL ON" statement will
> >do what you're after. ie:
> >
> >label on MyTable(
> >    col01 is 'column_one',
> >    col02 is 'column_two',
> >    col03 is 'column_three')
>
> I tried that, but it appears to only change the column heading, not add an
> alias.
>
> label on column master.pnpa is 'PRIMARY_NPA'
>   LABEL ON for MASTER in BUCK completed.
> select primary_npa from master
>   Column PRIMARY_NPA not in specified tables.
> dspffd master
>            Data        Field  Buffer    Buffer        Field    Column
> Field      Type       Length  Length  Position        Usage    Heading
> PNPA       ZONED        5  0       5         1        Both     PRIMARY_NPA
>   Field text  . . . . . . . . . . . . . . . :  NPA-
>
> After seeing both answers, I'm sure I did a poor job of
> explaining what I'm
> after.  In DDS, there's a keyword called ALIAS.   It adds another
> name (IBM
> call it the alternative name.)  This alternative name is not
> accessible from
> RPG, but it is accessible from COBOL, PL/I and SQL.
>
> The DDS specs are created by a CASE tool called Cool2:E (formerly Synon.)
> The CASE tool is great, but we want to write some stored
> procedures and the
> SQL guys are balking at the Ugly generated field names; names
> that look like
> this: B1LWNB, B1EJCF, B1EKCF, B1N4CD...  I can easily write a program to
> update the generated DDS, add ALIAS to each field and CHGPF each
> file, but I
> was hoping for a way to do that without having to tinker with the DDS.
>
> Buck



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.