FOCUS 7.7.06 Upgrade Considerations Found by SCANFOC

The following upgrade considerations can be found by the SCANFOC tool. The letter and number preceding the upgrade consideration description refer to the test name as displayed in the SCANFOC output report.

For information about finding upgrade issues in your applications using the SCANFOC tool, see Option 5: Scanning for Possible Upgrade Issues.

T1 - FAILING TSO COMMAND GIVES DIFFERENT ERROR IN RETCODE

Explanation

The return code for failure of a TSO command changed from TSO RC=2 (warning) to TSO RC=8 (fatal error). However, you can alter the navigation within the application by testing the &RETCODE variable, which is set to -1 when there is any type of error. The actual return code is now included in the error output. For example, when issuing an allocation for a data set that is not catalogued:

(FOC331) ERROR IN TSO COMMAND RC= 12

Correction

Adjust your FOCEXEC to test only for success (&RECODE=0), therefore avoiding having to know the failure values. For example, the following commands set the &RCODE variable to 8 when there is any kind of failure, and zero (0) otherwise. Then, it branches to continue the application if no failure was returned:

-SET &RCODE = IF &RETCODE NE 0 THEN '8' ELSE '0';
-IF  &RCODE EQ '0' GOTO OKCONTINUE;
T2 - AMPER VARIABLES CAN ONLY BE PRECEDED BY SPACE, DOT OR CARET

Explanation

Any variable name that is preceded by a character other than a dot (.), space, or caret (<) is not evaluated and will change output behavior. For example, the variable &LABEL in the following commands will not be evaluated, so the application will not branch to the correct location:

-SET &LABEL = 'R010';
-SET &LINES = 1;
-IF &LINES GT 0 THEN GOTO :&LABEL;

Concatenating variable names, for example &ABC&EFG, which used to be supported, now causes the variables not to be evaluated.

Correction

  • Add a space before the ampersand (&), where possible. For example:
    -SET &LABEL = 'R010';
    -SET &LINES = 1;
    -IF &LINES GT 0 THEN GOTO : &LABEL;
  • Add .EVAL to the amper variable to force evaluation.
T3 - BITSON MUST OUTPUT TO NUMERIC VALUE, ALPHA NO LONGER ALLOWED

Explanation

The output format for the BITSON function must now be numeric, and the new behavior is to error out based upon improper usage.

Correction

Adjust the output format to a numeric format. For Dialogue Manager, change the output argument to 'I1'.

T4 - DIALOGUE MANAGER EDIT OF CONCATENATED VALUE MUST INCLUDE MASK

Explanation

When using an operation (such as concatenation) for the EDIT argument with a Dialogue Manager variable, you must now include a mask (convert to EDIT with two arguments). For example, consider the following -SET commands in which the EDIT function is used with a variable concatenated to a string.

-SET &TBOWNER = USER1 ;
-SET &TBNAME1= EDIT(&TBOWNER ||'.SNUM01');
-SET &TBNAME2= EDIT(&TBOWNER ||'.SNUM01','999999999999999');
-TYPE TBNAME1 &TBNAME1
-TYPE TBNAME2 &TBNAME2

The output shows that the first EDIT returns zero (0) because there is no mask, but the second edit returns the correct string.

TBNAME1 0
TBNAME2 USER1.SNUM01

Correction

There are two solutions:

  • Create a separate variable for the operation and use that as the argument.
  • Add a mask that covers the full length of the output with '9' characters that transfer the input value to the output value.
T5 - DYNAM USING VIO FOR HIPERSPACE NO LONGER SUPPORTED

Explanation

Use of the UNIT VIO is no longer accepted in the DYNAM command for initial allocation or allocation to increase space. If allowed, this is now handled automatically. UNIT NOHIPER to prevent use of Hiperspace is still functional.

Correction

The UNIT VIO parameter is ignored and can be removed after verification that space allocations are being handled correctly by testing with load.

T6 - UNIQUE CONDITIONAL JOINS CANNOT TEST ONLY ON HOST FILE

Explanation

WHERE conditions in a unique conditional JOIN must include fields from the cross-referenced file. They can reference both host and cross-referenced fields or cross-referenced fields only. The WHERE conditions in the JOIN control selections on the cross-referenced file. Conditions based only on host fields in the JOIN will be ignored.

Correction

If a WHERE condition only references fields in the host file, remove it from the JOIN syntax and place it in the request, or create a FILTER to handle it.

T7 - ON TABLE SET ALL ON NO LONGER BEHAVES LIKE SET ALL PASS

Explanation

With SET ALL=OFF, ON TABLE SET ALL ON no longer behaves like SET ALL=PASS , allowing tests to pass missing data at lower levels.

Correction

Use SET ALL=ON outside the request for ALL=ON. Use SET ALL=PASS outside the request for ALL=PASS.

T8 - PCKOUT NO LONGER RETURNS NONPRINTABLE VALUES IN DIALOGUE MANAGER

Explanation

Dialogue Manager variables no longer handle non-printable characters. Values for UFMT and PCKOUT display as 00.

Correction

Nest UFMT and PCKOUT to work around this limitation.

T9 - UFMT NO LONGER RETURNS NONPRINTABLE VALUES IN DIALOGUE MANAGER

Explanation

Dialogue Manager variables no longer handle nonprintable characters. Values for UFMT and PCKOUT display as 00.

Correction

Nest UFMT and PCKOUT to work around this limitation.

T10 - MODIFY COMPUTE MISSING TESTS RETURN DIFFERENT VALUES

Explanation

The MISSING ON attribute is now required in MODIFY with null or missing data entered using FIXFORM. Otherwise, COMPUTEs may now return different results.

Correction

If the transaction file has a null (missing data) value for a field and you want to input this value as a blank, the Master Files for both the transaction file and the data source being modified must have MISSING=ON for that field.

T11 - COMBINE NAME CANNOT USE EXISTING MASTER NAME

Explanation

When using DBA, referencing the name of an existing Master File as the COMBINE name will cause an error. This will error out with a FOC053 message indicating an invalid COMBINE, typically followed by a FOC047 message indicating that access to the file is denied. This test uses the list of Master Files in the CHKMAS1 file generated when the SCAN tool checks Master Files (Option 1), and searches for COMBINE names that it then checks against that file.

Correction

Change the Master File name or the COMBINE name so that they do not exactly match each other.

T12 - MIN/TOT FAIL IN ON TABLE SUBFOOT IN MFD W/O SEGNAME SEGTYPE

Explanation

Due to code tightening, SEGNAME is one of the required elements to be included in all Master Files. The lack of a SEGNAME attribute causes a FOC406 error message to be displayed when a request includes a SUBFOOT using either the TOT. or MIN. prefix operator. This test will find the SUBFOOT that has prefix operators.

Correction

Check the Master File that is being examined to ensure there are SEGNAMEs included in the file.

T13 - DEFINE/COMPUTE WARNING ON LITERAL LONGER THAN FIELD

Explanation

Prior to release 7.7, a leading space in a literal string was considered part of the data. It is now stripped prior to any comparison, leading to potentially different results from the comparison. This issue surfaces in DEFINEs, COMPUTEs, and MODIFY COMPUTEs. The FOC015 warning message may be issued, but it may not be seen depending on the running environment. This test finds static literals used in expressions that contain a leading space.

Correction

Edit the test conditions. For example:

DEFINE FILE CAR                                                 
TEST1/F1=IF EDIT(COUNTRY,'9999999') IS ' ENGLAND' THEN 1 ELSE 0;
END                                                             
TABLE FILE CAR                                                  
PRINT COUNTRY TEST1                                             
END   
T14 - UNBALANCED QUOTES AT END OF EXPRESSION THROW ERROR

Explanation

An extra quotation mark at the end of a line will now cause the FOC257 MISSING QUOTE MARKS error to be generated. In release 7.6 and prior releases, the extra quotation mark was ignored.

Correction

Remove extra quotation marks.

T15 - HOLD FORMAT INTERNAL FAILS WITH EXTSORT/EXTHOLD ON

Explanation

When HOLD FORMAT INTERNAL is used in a request, EXTHOLD will be turned off, forcing the HOLD to be done by FOCUS. Major improvements have been made in the speed of the FOCUS sort, and we believe the necessity to use an external sort is largely gone. Due to changes in the HOLD process, when using HOLD FORMAT INTERNAL, we now require that the HOLD be done by FOCUS regardless of where the sort is being done.

Correction

No action necessary.

T16 - WHERE TOTAL,MAX. AND MULTI-VERB GIVE DIFFERENT RESULTS

Explanation

Behavior change: In multi-verb requests, WHERE TOTAL should be using the fields and values at the lowest verb level. Use of the same field at multiple levels along with the addition of a prefix operator prevented this from occurring. Current behavior produces correct results:

TABLE FILE CAR                                                   
SUM DEALER_COST                                                  
BY COUNTRY                                                       
SUM DEALER_COST                                                  
MAX.DEALER_COST                                                  
BY COUNTRY                                                       
BY CAR                                                           
BY MODEL                                                         
WHERE TOTAL DEALER_COST GT 10000                                 
END                                                              

In this example, WHERE TOTAL now correctly uses the data values for DEALER_COST from the second verb. Previously, values were used from the first verb, giving different results.

Correction

No action necessary.

T17 - USE OF SET NATVFLG IS NO LONGER SUPPORTED

Explanation

NATVFLG will no longer have any effect on previously created setting values. Therefore, if this SET is detected, the FOCEXEC should be tested to verify that the results are correct and that the NATVFLG functionality is not required.

Correction

If this is not the case, an Inforesponse Live case should be opened with the details of the DEFINE.

T18 - USE OF REXX EXECS NOW REQUIRES AUTHORIZATION

Explanation

Any use of REXX subroutines now requires system authorization. As of release 7.6, FOCUS became a fully compliant LE product, and with 7.6.10 authorization became required in order to use the zIIP engines with FOCUS.

Correction

Configure APF authorization for FOCUS if any REXX subroutines will be called.

T19 - SET HOLDMAST ERRORS OUT - REPLACE WITH APP HOLDMETA

Explanation

The SET HOLDMAST = value command is no longer honored. HOLDMAST can still be allocated in JCL and using TSO and DYNAM commands. Also available now is the APP HOLDMETA <appname> command. Details are provided in the Developing Applications Manual.

Correction

Replace SET HOLDMAST with an allocation or APP HOLDMETA command.

T20 - LONG PACKED FIELDS ASSIGNED TO SHORTER FIELDS MAY OVERFLOW

Explanation

Using DEFINE to convert from long Packed (P16 Actual) to Packed (P8 Actual) may cause an overflow error when the field is printed, generating the following message:

(FOC1994) INTERRUPT. PACKED VALUE OVERFLOW

Correction

Re-assign the field in a COMPUTE command.


Information Builders