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

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

book

Article ID: 11512

calendar_today

Updated On:

Products

UFO

Issue/Introduction

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

Environment

Release: ESBUFO99000-3.2-Extended Support Basic-for UFO
Component:

Resolution

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. 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 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      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.