Features Added in FOCUS 7.7.09

In this section:

The following features were added as of FOCUS 7.7.09.

SQL Adapters

In this section:

The following features apply to SQL adapters.

All SQL Adapters

SQL Adapters: Optimization of Simplified Statistical Functions

Simplified statistical functions can now be optimized to SQL for those adapters that support statistical functions.

SQL Adapters: Support for SET HOLDATTR for Formats SAME_DB and SQL_SCRIPT

The SET HOLDATTR command propagates TITLE and DESCRIPTION attributes from a source Master File to a HOLD Master File. This command is now supported for formats SQL_SCRIPT and SAME_DB.

Example: Propagating TITLE and DESCRIPTION Attributes to a HOLD File in Format SQL_SCRIPT

The following request propagates TITLE and DESCRIPTION attributes to a HOLD file generated as format SQL_SCRIPT.

APP HOLD ibisamp
SET HOLDATTR=ON
TABLE FILE wf_retail_lite
SUM BUSINESS_REGION STATE_PROV_CODE_ISO_3166_2
BY BUSINESS_REGION NOPRINT 
BY STATE_PROV_CODE_ISO_3166_2 NOPRINT
WHERE BUSINESS_REGION EQ 'North America' OR 'EMEA'
WHERE STATE_PROV_CODE_ISO_3166_2 EQ 'AR' OR 'IA' OR 'KS' OR 'KY' 
OR 'WY' OR'CT' OR 'MA' OR '04' OR '11' OR '14'OR 'NJ' 
OR 'NY' OR 'RI'
ON TABLE HOLD AS HOLDATT2 FORMAT SQL_SCRIPT
END

The generated Master File, holdattr2.mas follows. The TITLE and DESCRIPTION attributes were propagated from the wf_retail_lite Master File.

FILENAME=HOLDATT2, SUFFIX=DATREC  , IOTYPE=BINARY, $
  SEGMENT=HOLDATTR, SEGTYPE=S0, $
    FIELDNAME=BUSINESS_REGION, ALIAS=E01, USAGE=A15V, ACTUAL=A15V,      MISSING=ON,
      TITLE='Customer,Business,Region', DESCRIPTION='Business Region', $
    FIELDNAME=STATE_PROV_CODE_ISO_3166_2, ALIAS=E02, USAGE=A5V, ACTUAL=A5V,      MISSING=ON,
      TITLE='Customer,State,Province,ISO-3166-2,Code', DESCRIPTION='The ISO-3166-2 Code for the State or Province', $
    FIELDNAME=NULLFLAG, ALIAS=__NULLFLAG__, USAGE=A2, ACTUAL=A2B, ACCESS_PROPERTY=(INTERNAL), $

Diagnostics: Improved Outer Join Rejection Messages for SQL Adapters

More explanation has been added to messages that result from a rejected outer join request.

Adapter for Db2

In this section:

The following features apply to the Adapter for Db2.

Support for DSN-Less Connections to Db2 on FOCUS for Distributed Systems

On FOCUS for Distributed Systems, you can specify the host name, port and database name instead of a DSN when configuring a connection to Db2.

Adapter for Oracle

Adapter for Oracle: Support for Version 18c on Distributed Systems

The Adapter for Oracle now has support for Version 18c on distributed systems.

Adapter for Oracle: Support for System-Versioned Temporal Tables

On FOCUS for Distributed Systems, temporal queries against Oracle System-Versioned tables have been implemented by introducing fields with TEMPORAL_PROPERTY SYSTEMTIME. Such a field is added by editing the synonym for the table. For example:

DEFINE FIELD1/HYYMDm WITH REALFLD TEMPORAL_PROPERTY SYSTEMTIME = ;$

The following are requirements for the field with TEMPORAL_PROPERTY SYSTEMTIME.

  • The field can have any valid field name.
  • The datatype must be a date-time datatype with sufficient precision.
  • The WITH clause is required and must reference a real table column.

Fields with TEMPORAL_PROPERTY=SYSTEMTIME can only be used in a single WHERE test of one of the following two types.

  • WHERE field EQ expression

    This type of WHERE test translates to an ORACLE AS OF TIMESTAMP clause.

  • WHERE field FROM expression1 TO expression2

    This type of WHERE test translates to a VERSIONS BETWEEN TIMESTAMP clause.

where:

expression, expression1, expression2

Must be date-time expressions or constants. When used in a FROM-TO expression, the constants DT('0001-01-01') and DT('9999-12-31') represent the oldest and most recent applicable timestamps. They translate to the ORACLE keywords MINVALUE and MAXVALUE.

Adapters for Sequential and Indexed Files

In this section:

The following features apply to the adapters for sequential and indexed files.

Adapter for Delimited Files: Skip Rows Before Header

When you create a synonym for a delimited file, you can indicate that a header row exists that provides column names. Sometimes, delimited files have other rows above the header row. These rows may be blank or may contain general heading information that do not provide attributes that should be included in the synonym. You can add the SKIP_ROWS=n attribute in the Access File to indicate that these rows should be ignored.

The following is a delimited file named SKIP2 that has two heading rows that should be ignored above the header row that contains the column titles.

 "Heading Line 1"                                
 "Heading Line 2"                                
 "Category","Product","Dollar Sales","Unit Sales"
 "Coffee","Capuccino",2401556,190880             
 "Coffee","Espresso",3906243,308986              
 "Coffee","Latte",11000388,882849                
 "Food","Biscotti",5387773,430369                
 "Food","Croissant",7758857,630753               
 "Food","Scone",4216114,333414                   
 "Gifts","Coffee Grinder",2436215,193616         
 "Gifts","Coffee Pot",2449585,190695             
 "Gifts","Mug",4522521,360570                    
 "Gifts","Thermos",2385829,190081                

The following is the Master File for the SKIP2 data source.

FILENAME=SKIP2   , SUFFIX=DFIX    , $                       
  SEGMENT=SKIP2, SEGTYPE=S2, $                              
    FIELDNAME=CATEGORY, ALIAS=E01, USAGE=A11, ACTUAL=A11, $ 
    FIELDNAME=PRODUCT, ALIAS=E02, USAGE=A16, ACTUAL=A16, $  
    FIELDNAME=DOLLARS, ALIAS=E03, USAGE=I08, ACTUAL=A08, $  
    FIELDNAME=UNITS, ALIAS=E04, USAGE=I08, ACTUAL=A08, $    

The following is the Access File for the SKIP2 data source, indicating that the first two rows should be ignored.

SEGNAME=SKIP2,      
  DELIMITER=',',    
  ENCLOSURE=",      
  HEADER=YES,  
  SKIP_ROWS=2,     
  CDN=COMMAS_DOT, $ 

The following request prints all of the fields in the SKIP2 data source.

TABLE FILE SKIP2        
PRINT *                 
ON TABLE SET PAGE NOLEAD
END                     

The output is:

CATEGORY     PRODUCT            DOLLARS     UNITS
--------     -------            -------     -----
Coffee       Capuccino          2401556    190880
Coffee       Espresso           3906243    308986
Coffee       Latte             11000388    882849
Food         Biscotti           5387773    430369
Food         Croissant          7758857    630753
Food         Scone              4216114    333414
Gifts        Coffee Grinder     2436215    193616
Gifts        Coffee Pot         2449585    190695
Gifts        Mug                4522521    360570
Gifts        Thermos            2385829    190081

Information Builders