What is CA UFO Executive Inquiry and how do we utilize it?

Document ID:  TEC276934
Last Modified Date:  07/11/2017
{{active ? 'Hide' : 'Show'}} Technical Document Details

Products

  • CA UFO

Releases

  • CA UFO:Release:3.2

Components

  • CA UFO:UFO
Question:

What is CA UFO Executive Inquiry and how do we utilize it?

Answer:

CA UFO provides ad hoc inquiries against a file or database segment using English-like statements. This feature is called Executive Inquiry. It does not require a screen definition or any programming. The only thing that is required is a UFO FDS layout of a file. Advantage CA UFO will build an output screen dynamically based on your requests.

Below is the syntax for Executive Inquiry:


UFO LIST|DISPLAY|PRINT 
    FROM <viewname> <field1> [<field2>...<fieldn>]
   [KEY <keyvalue>...]
   [ON <TERMID>]
   [SELECT|WHEN|WHERE <expression>]
   [SAMPLE (<integer>)]
   [PROCEDURE|PROC <procname>]
   [SAVE <name>]
   [SORT <fieldname> <sequence>...]

The initial argument (LIST|DISPLAY|PRINT) determines how Advantage CA UFO formats the query results.

LIST      A single record is displayed on a screen, one field per row. SORT is not a valid argument.

Below is an example of LIST using the following UFO FDS called PRESFILE:M



UFOFDSS          REVIEW FDS ENTRIES SORTED BY START       FUNCTION--> *     
                         ( INQUIRY ONLY )                                   
FILE DEFINITION NAME: PRESFILE                                              
**NAME**  ***********DESCRIPTION*********   TYP LEN START ATT D EDIT OC STA 
                                            F U           F D P CD F #  TUS 
PRESGRP   KEY GROUP HEADER                  G     3     3 0 8 0 00   01     
PRESKEY   PRESIDENT NUMBER                  Z     3     3 0 8 0 00   01     
PRESLNAM  LAST NAME                         C    15     6 0 8 0 00   01     
PRESFNAM  FIRST NAME                        C    10    21 0 8 0 00   01     
PRESYEAR  YEAR INAUGURATED                  Z     4    31 0 8 0 00   01 
    
UFO LIST FROM PRESFILE PRESKEY PRESLNAM PRESFNAM

This produces the following results:


8000DD            UFO EXECUTIVE INQUIRY RELEASE R3.2.0     FUNCTION--> * 
                                                                         
                    PRESIDENT NUMBER... 001                              
                           LAST NAME... WASHINGTON                       
                          FIRST NAME... GEORGE  

Each field has its own row on the screen. The description for each field comes from the FDS description. To advance to the next record, place a +1R in the function field.

DISPLAY      Multiple records are displayed on a screen in columnar format. Advantage CA UFO uses the first two words from the field descriptor in the data dictionary as a column heading. SORT is not a valid argument.

Below are examples of the DISPLAY option for executive inquiry:

UFO DISPLAY FROM PRESFILE PRESKEY PRESLNAM PRESFNAM PRESYEAR

This produces the following execute inquiry:

  8000DD UFO EXECUTIVE INQUIRY RELEASE R3.2.0     FUNCTION--> *   
                                                                           
PRESIDENT LAST            FIRST             YEAR                           
   NUMBER NAME            NAME       INAUGURATED                           
      001 WASHINGTON      GEORGE            1789                           
      002 ADAMS           JOHN              1797                           
      003 JEFFERSON       THOMAS            1801                           
      004 MADISON         JAMES             1809                           
      005 MONROE          JAMES             1817                           
      006 ADAMS           JOHN Q            1825                           
      007 JACKSON         ANDREW            1829                           
      008 VAN BUREN       MARTIN            1837                           
      009 HARRISON        WILLIAM           1841                           
      010 TYLER           JOHN              1841                           
      011 POLK            JAMES             1845
 

Below is an example of an executive inquiry using the selection option to display all of the presidents that have a first name of JAMES. The select option gives you that capability.

UFO DISPLAY FROM PRESFILE PRESLNAM PRESFNAM PRESYEAR SELECT PRESFNAM EQ 'JAMES'

This produces the following results:


8000DD            UFO EXECUTIVE INQUIRY RELEASE R3.2.0     FUNCTION--> *
                                                                         
 LAST            FIRST             YEAR                                  
 NAME            NAME       INAUGURATED                                  
 MADISON         JAMES             1809                                  
 MONROE          JAMES             1817                                  
 POLK            JAMES             1845

Note: The WHEN or the WHERE parameter may be used instead of the SELECT parameter to achieve the same results.

PRINT      Advantage CA UFO formats the information into a columnar report for printing. As with DISPLAY, field descriptors are used as column headings.

Below is an example of the PRINT option displaying the president number, last and first name followed by the year inaugurated:

UFO PRINT FROM PRESFILE PRESKEY PRESLNAM PRESFNAM PRESYEAR

This produces the following results:


PRESIDENT LAST            FIRST             YEAR              
   NUMBER NAME            NAME       INAUGURATED              
      001 WASHINGTON      GEORGE            1789              
      002 ADAMS           JOHN              1797              
      003 JEFFERSON       THOMAS            1801              
      004 MADISON         JAMES             1809              
      005 MONROE          JAMES             1817              
      006 ADAMS           JOHN Q            1825              
      007 JACKSON         ANDREW            1829              
      008 VAN BUREN       MARTIN            1837              
      009 HARRISON        WILLIAM           1841              
      010 TYLER           JOHN              1841              
      011 POLK            JAMES             1845                                                                         
                   

MS55 Paging operation completed as requested                  
REPORT: 8000DD   FUNCTION: +1P      COLUMNS: 01 04 PAGE: ...1

Below is the executive inquiry that displays the presidents in alphabetic order:

UFO PRINT FROM PRESFILE PRESLNAM PRESFNAM PRESYEAR SORT PRESLNAM

This produces the following results:


 LAST            FIRST             YEAR                        
 NAME            NAME       INAUGURATED                        
 ADAMS           JOHN              1797                        
 ADAMS           JOHN Q            1825                        
 HARRISON        WILLIAM           1841                        
 JACKSON         ANDREW            1829                        
 JEFFERSON       THOMAS            1801                        
 MADISON         JAMES             1809                        
 MONROE          JAMES             1817                        
 POLK            JAMES             1845                        
 TYLER           JOHN              1841                        
 VAN BUREN       MARTIN            1837                        
 WASHINGTON      GEORGE            1789
 MS55 Paging operation completed as requested                  
 REPORT: 8000DD   FUNCTION: +1P      COLUMNS: 01 03 PAGE: ...1 

 

Additional Information:

For more information, see the CA UFO Application Programmer Guide Section 22.

Please help us improve!

Will this information enable you to resolve your issue?

Please tell us what we can do better.

{{feedbackText.length ? feedbackText.length : '0'}}/255

{{status}}

Not what you were looking for?

Search Again >

Product Information

Support by Product >

Communities

Join a Community >

Chat with CA

Just give us some brief information and we'll connect you to the right CA ExpertCA sales representative.

Our hours of availability are 8AM - 5PM CST.

All Fields Required

connecting

We're matching your request.

Unfortunately, we can't connect you to an agent. If you are not automatically redirected please click here.

  • {{message.agentProfile.name}} will be helping you today.

    View Profile


  • Transfered to {{message.agentProfile.name}}

    {{message.agentProfile.name}} joined the conversation

    {{message.agentProfile.name}} left the conversation

  • Your chat with {{$storage.chatSession.messages[$index - 1].agentProfile.name}} has ended.
    Thank you for your interest in CA.


    Rate Your Chat Experience.

    {{chat.statusMsg}}

agent is typing