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     Is there a limit to how many variables can be read with -READ

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Is there a limit to how many variables can be read with -READ
 Login/Join
 
Member
posted
Hi,
I'm trying to read 17 local variables from a single ALPHA hold file. The variable names exceed the 86 character limit for the text editor so I split them over a few lines :
TABLE FILE MOD5
PRINT
MANNED
MATERIAL
DOWNSTREAM
XSHUT
NOT_REQ
MECHANICAL
ELECTRICAL
PLANNED
ROLL_CHANGES
STRIP_BREAKS
KNIFE_CHANGES
LINE_PREP
OPERATIONAL
OTHER_DELAYS
SOW_HRLOSS
RFT_HRLOSS
SCRAP_HRLOSS
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END

-*(this generaets a single record list)
-RUN
-READ HOLD1 &MANNED.D12.2. &MATERIAL.D12.2. &DOWNSTR.D12.2.
&XSHUT.D12.2. &NOT_REQD.D12.2. &MECH.D12.2. &ELEC.D12.2.
&PLAN.D12.2. &ROLL.D12.2. &STRIP.D12.2. &KNIFE.D12.2.
&LINE.D12.2. &OPER.D12.2. &OTHER.D12.2. &SOWT.D12.2.
&RFTT.D12.2. &SCRT.D12.2.
-RUN

When I try to run this it asks me for a number of variables called '2' to be input by the user before returning an error later in the code.

Is there a limit to how many variables I can read from one file, or is there something I'm missing in my READ code ?
Any help would be greatly appreciated. For now I'm going to split the APLHA hold file into a number of smaller files.

I am still using Webfocus 4.3.6

Regards,
Trevor Wilson
 
Posts: 12 | Location: Llanelli, South Wales, UK | Registered: November 17, 2005Report This Post
Expert
posted Hide Post
Hi Trevor,

Hope all is well in Corus.

You might want to use SAVE instead of HOLD, but only because HOLD creates an MFD which you do not need.

With the type of READ that you are using (fixed format), if you need to move onto extra lines then suffix each line to be continnued with a comma and prefix the next line with a hyphen and a comma. Check out this link (you will need to logon).

I'm not too sure that you can use formats of D12.2 in a read but can not find any document that mentions that.

The alternative (rather messy) method is to read it into one variable and then split it out.

Good luck

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Trevor,

I have just checked the D12.2 format and all appears OK.

Unfortunately I only have access to Windows based WF so do not have the character limit in a line (and I can't remember the last time I used Z/OS with WF!). Thefore I cannot check further for you.

However, if you really get stuck, then give IB tech support a call on 0845 658 8181 who should be able to assist you.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
Trevor,

Take a look at this and see if it helps.

I tried to come up with an example using the CAR file.

DEFINE FILE CAR
VAR01/D12.2 = 1.01;
VAR02/D12.2 = 2.02;
VAR03/D12.2 = 3.03;
VAR04/D12.2 = 4.04;
VAR05/D12.2 = 5.05;
END
TABLE FILE CAR
PRINT
COUNTRY
VAR01
VAR02
VAR03
VAR04
VAR05
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-*(this generates a single record list)
-RUN
-*
-SET &COUNTRY = 'XXX';
-SET &VAR01 = 0.00;
-SET &VAR02 = 0.00;
-SET &VAR03 = 0.00;
-SET &VAR04 = 0.00;
-SET &VAR05 = 0.00;
-READ HOLD1 &COUNTRY.A10. &VAR01.D12.2. &VAR02.D12.2.,
-, &VAR03.D12.2. &VAR04.D12.2.,
-, &VAR05.D12.2.
-RUN
-*
-TYPE COUNTRY ---- &COUNTRY
-TYPE VAR01 ------ &VAR01
-TYPE VAR02 ------ &VAR02
-TYPE VAR03 ------ &VAR03
-TYPE VAR04 ------ &VAR04
-TYPE VAR05 ------ &VAR05

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Platinum Member
posted Hide Post
Trevor,

Here's another example using a one line Focus file as your hold file. You create your variables and hold them in a single record Focus file that is indexed by some constant string(I used "VAR" but it could be anything). Then create a define-based join to this hold file and you have all of your variables available within your table request. This of course will not work if you need these variables to be amper variables.

Just another idea!!

DEFINE FILE CAR
H_LINK/A3 = 'VAR';
VAR01/D12.2 = 1.01;
VAR02/D12.2 = 2.02;
VAR03/D12.2 = 3.03;
VAR04/D12.2 = 4.04;
VAR05/D12.2 = 5.05;
END
TABLE FILE CAR
PRINT
COUNTRY
VAR01
VAR02
VAR03
VAR04
VAR05
BY H_LINK
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS HOLD1 FORMAT FOCUS INDEX H_LINK
END
-*
JOIN C_LINK WITH COUNTRY IN CAR TO H_LINK IN HOLD1 AS J1
DEFINE FILE CAR
C_LINK/A3 = 'VAR';
END
TABLE FILE CAR
PRINT
COUNTRY
CAR
C_LINK
H_LINK
VAR01
VAR02
VAR03
VAR04
VAR05
END

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Expert
posted Hide Post
Jim,

You're trying too hard!
SET HOLDLIST = PRINTONLY
-RUN
DEFINE FILE CAR
  MYVAL/D12.2 = DCOST;
END
TABLE FILE CAR
SUM MYVAL
ACROSS COUNTRY
ON TABLE SAVE
END
-RUN

-READ SAVE &Value1.D12.2., &Value2.D12.2., &Value3.D12.2., &Value4.D12.2., &Value5.D12.2.

-? &Value
Gives
   &Value1       =     37853.00 
   &Value2       =      4631.00 
   &Value3       =     41235.00 
   &Value4       =      5512.00
   &Value5       =     54563.00



T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Hi Tony and Jim,
Thanks very much for your suggestions.
In the end, the comma / hyphen solution did the job perfectly, but I have also taken on board the points about SAVE vs HOLD.

I'll look into this next week, as I am off now to enjoy the rest of the half term holiday with my son !

Kind regards and thanks again for your help.
Trevor
 
Posts: 12 | Location: Llanelli, South Wales, UK | Registered: November 17, 2005Report 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     Is there a limit to how many variables can be read with -READ

Copyright © 1996-2020 Information Builders