Re: QUSLFLD API and DSPFFD REFFLD Reference Field and file

Thomas Raddatz <[email protected]> Wed, 27 Jul 2005 17:51:40 +0200
Newsgroups gmane.comp.systems.as400.open-source
Message-ID <[email protected]>
Andre,

For what I know QUSLFLD does not return any field reference information. Instead 
of QUSLFLD you may consider to use the "Retrieve Database File Description" 
(QDBRTVFD) API.

Some times ago I wrote a service program to retrieve field attributes of a given 
field from a given file. It uses the QDBRTVFD API. The service program can 
retrieve field attributes of a specific field or it can spin through all fields 
of a given file using "cFLDDCT_FLD_FIRST" and "cFLDDCT_FLD_NEXT" special values.

This is the information returned by the service program:

       *===============================================================*
       *  QDBRTVFD API - FLDA0200                                      *
       * ============================================================= *
      D flda0200_t...
      D                 DS                   qualified
       * File name
      D  file                         10A
       * Library name
      D  lib                          10A
       * Field name
      D  name                         10A
       * Data type
      D  type                          1A
       * Use
      D  use                           1A
       * Output buffer position
      D  outBufPos                    10I 0
       * Input buffer position
      D  inBufPos                     10I 0
       * Field length in bytes
      D  length                       10I 0
       * Digits
      D  digits                       10I 0
       * Decimal position
      D  decPos                       10I 0
       * Field text description
      D  text                         50A
       * Edit code
      D  edtC                          2A
       * Edit word length
      D  edtWLen                       9B 0
       * Edit word
      D  edtW                         64A
       * Column heading 1
      D  colHdg1                      20A
       * Column heading 2
      D  colHdg2                      20A
       * Column heading 3
      D  colHdg3                      20A
       * Date and time format
      D  datTimFmt                     4A
       * Date and time separator
      D  datTimSep                     1A
       *
       *  Additional fields of format FLDA0200
       * Reference file name
      D  refFile                      10A
       * Reference library name
      D  refLib                       10A
       * Reference record format name
      D  refFmt                       10A
       * Reference field name
      D  refFld                       10A
       *


Let me know if you want a copy of it.

Thomas Raddatz.

Andre Dubreuil schrieb:
> Hello Everyone,
>  
> I need the help of a Guru.
>  
> I have a program that uses QUSLFLD. No problem with using this API.
>  
> Where the problem lies is that I am now trying to use it to retrieve the 
> reference field and reference file information.
>  
> It seems that this information is not returned by the QUSLFLD API whether you 
> specify the format FLDL0100, FLDL0200 or FLDL0300
>  
> What API Can use to find this information (reference file and reference field)?
>  
> Please, 
> The utilisation of QSYS/QADBIFLD and/or DSPFFD OUTPUT(*OUTFILE) is not an 
> option.
>  
> Best Regards,
> Andre Dubreuil
> andredub-/[email protected]
> 
> 
> 
> 
> ---------------------------------
> Visit my eBay store: Andredub's Collectibles
> http://stores.ebay.com/andredub?refid=store
> 
> _______________________________________________
> This is the Open Source Software for the AS400/iSeries (OSS400) mailing list
> To post a message email: OSS400-Zwy7GipZuJhWk0Htik3J/[email protected]
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/oss400
> or email: OSS400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/oss400.
> 

_______________________________________________
This is the Open Source Software for the AS400/iSeries (OSS400) mailing list
To post a message email: OSS400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/oss400
or email: OSS400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/oss400.