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     FOCUS code reference

Read-Only Read-Only Topic
Go
Search
Notify
Tools
FOCUS code reference
 Login/Join
 
Member
posted
Given the following mainframe FOCUS code:

-RSMSEL
-************************************************
DYNAM ALLOC FILE RSMLIST UNIT SYSDA SPACE 5 BLOCKS RECFM FB -
LRECL 4 BLKSIZE 200
-RUN



-************************************************
-DORSM
-************************************************
-WINDOW PW4100 EMI25 GETHOLD
-IF &EMI25 EQ ' ' THEN GOTO IFRSM;
-WRITE RSMLIST &EMI25
-GOTO DORSM



-************************************************
-IFRSM
-************************************************
-WRITE IFFILE IF RGNCODE EQ (RSMLIST)



What is the meaning of putting RSMLIST in parentheses in the last line of the code?

RGNCODE is defined as 4 character field (represents region code)
 
Posts: 10 | Registered: May 11, 2005Report This Post
Virtuoso
posted Hide Post
quote:
-WRITE IFFILE IF RGNCODE EQ (RSMLIST)

If I read the code correctly, it is writing IFFILE when the RGNCODE is in the file RSMLIST
a selection option.

Of course I don't do much with dialog manager, but it appears that the file is allocated, then some processing is done to create the RSMLIST data, then the processing of the IFFILE to select from what was just built. I assume &EMI25 is a parameter sent from somewhere.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
My guess is that RSMLIST is a file containing values for RGNCODE.

This follows the TABLE screening option

IF fieldname EQ (file)

and all values in the file are compared for selection.

The file RSMLIST would need to be allocated when it is to be used in this manner, as would IFFILE to be accessed and READ to get that line.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
Hi Ricky,

The expression IF RGNCODE EQ (RSMLIST) is a valid IF statement. When executed FOCUS will compare the value of the field RGNCODE with the contents of the file allocated to RSMLIST. [BTW, the data within the file should be characters only - not binary - and have one value per record]

The DM statement -WRITE IFFILE IF RGNCODE EQ (RSMLIST) writes the IF statement to the file allocated to IFFILE. I suppose that somewhere along the line you will find -INCLUDE IFFILE.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
RickyB,

Somewhere else in your code, you should see a -READ IFFILE &variable, followed by a TABLE command that has &variable within in. The code appears to be building a dynamic IF test for a later report and is saving it to a file (called IFFILE) for later use.

If this test was being used just in this code, it probably could have just been a -SET &variable = "IF RGNCODE EQ (RSMLIST);" (the IFRSM logic) or "-SET &variable = &EMI25;" (the DORSM logic).

Because it is in a file, perhaps the code is creating this file of IF tests for a later program. This is like a mailbox where one program is dropping off a letter for another program.

Like the others said, the phrase "IF field IS (holdfile)" is checking to see if the field value is one of the values in the holdfile. Keep in mind that this technique has a size limitation on the holdfile. I think it used to be limited to just 32K of data, although this may have been increased in later versions of FOCUS/WebFOCUS.


Sincerely,

Doug Lautzenheiser
Multiple products (FOCUS, WebFOCUS, iWay), releases (4-8.2), platforms (e.g., MVS, OpenVMS, Linux, iSeries, Windows), databases (e.g., Oracle, SQL Server, DB2, IMS, Hyperstage, etc.), integrated technologies (e.g., C/C++, R, Python)
Currently doing great things on WF8.2
 
Posts: 7 | Location: Midwest United States | Registered: February 14, 2007Report 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     FOCUS code reference

Copyright © 1996-2020 Information Builders