Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     DECODE LIMITS In Mainframe FOCUS 7.2

Read-Only Read-Only Topic
Go
Search
Notify
Tools
DECODE LIMITS In Mainframe FOCUS 7.2
 Login/Join
 
Silver Member
posted
In MF FOCUS 7.2.5 what is the total character limit for DECODE tables. I want to try using decodes to a total of 7 files. I need to build the decodes on the fly. Thanks

This message has been edited. Last edited by: Sandy Weller,


Signature changes from project to project
 
Posts: 38 | Location: Chicago, IL area | Registered: June 16, 2004Report This Post
Gold member
posted Hide Post
Sandy,

What type of Database are you using? Are you connecting to FOCUS files? or another database that may use SQL.


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
 
Posts: 95 | Registered: July 31, 2007Report This Post
Silver Member
posted Hide Post
Eric,

I'm going to connect to flat files within a DEFINE. Does that makes a difference in total character count now?


Signature changes from project to project
 
Posts: 38 | Location: Chicago, IL area | Registered: June 16, 2004Report This Post
Expert
posted Hide Post
From IBI Site:

FOCUS for Mainframe Techniques/Code Examples

How to get around the FOC017 error message when using WHERE field in FILE ddname syntax
Applicable to: All releases

As of IBM Mainframe Release 7.0, the previous FOCUS limit of 3,200 bytes in a file used for selection criteria has been changed to 32,767 literals. This change applies to IF tests that use the following syntax:

IF fieldname operator (ddname) [OR (ddname)...]

The limit for the WHERE phrase remains unchanged. See the FOCUS for IBM Mainframe User Manual for more information on IF and WHERE syntax. The old limit of 3,200 bytes still applies to all non-FOCUS databases with the exception of relational tables.

Here are some solutions to consider when using WHERE field in FILE ddname syntax:

If WHERE is being used, try changing the syntax to use the IF syntax as noted above.
If the file you are testing on is a non-FOCUS file, try changing the file to a FOCUS file by HOLDing it, using ON TABLE HOLD FORMAT FOCUS so that you can still use the IF fieldname operator (ddname) syntax. This will allow the maximum limit to be 32K.
If you can put the conditions you need met in a DEFINE, define a numeric field such that it is 1 if the condition is true, 0 if it is false. Then do a multi-verb request such as:
SUM DEFINE_FIELD BY SSN
PRINT whatever BY SSN
WHERE TOTAL DEFINE_FIELD GT 0

This will give you a list of only those SSN's that have any record that meets the DEFINE_FIELD criteria.

Consider the use of JOIN or DECODE as an alternative as documented in the Systems Journal Encyclopedia, Fall 1991.
Example using JOIN:

TABLE FILE ORIGLIS
SUM COMPUTE SELECT/I1=1;
BY ORIGDEPT
ON TABLE HOLD FORMAT FOCUS INDEX ORIGDEPT
END
JOIN DEPARTMENT IN EMPLOYEE TO ORIGDEPT IN HOLD AS JOIN1
TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME
IF SELECT NE 0
END

Example using DECODE:

DEFINE FILE EMPLOYEE
SELECT/I1=DECODE DEPARTMENT(DEPTLIST ELSE 1);
END
TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME
IF SELECT EQ 0
END

Split the external file into separate files and use multiple IF statements to get around the file limitation.


The Link


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
Thanks Tom,

If I read this right: If I'm using flat files for my DECODES I only get 3200 characters but if I write the lookups to a file FORMAT FOCUS I get up 32K.

Can I do DECODE in a DEFINE to the FORMAT FOCUS files?


Signature changes from project to project
 
Posts: 38 | Location: Chicago, IL area | Registered: June 16, 2004Report This Post
Expert
posted Hide Post
Sandy,

Yep, that's what I would do. The key point I saw was:

quote:

The old limit of 3,200 bytes still applies to all non-FOCUS databases with the exception of relational tables.


Since you say you are using text files, I would hold the data FORMAT FOCUS (which creates a MODIFY overhead), then, try your DECODE against the HOLD file.

Another thought: After creating the FOCUS DB, you may be able to JOIN your data and forego the DECODE.

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     DECODE LIMITS In Mainframe FOCUS 7.2

Copyright © 1996-2020 Information Builders