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     Using values from HOLD file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Using values from HOLD file
 Login/Join
 
Silver Member
posted
Hi,

I am creating a HOLD file as HOLD1 as follows:


TABLE FILE abc
SUM
field1
BY field2
ACROSS field3
ON TABLE HOLD AS HOLD1
END
-RUN

The output is like:

field2 A B C D E

R1 100 200 300 400 500
R2
R3
R4


Now I want to define a field from HOLD1 which should add values corresponding to B and D.Finally to print
values A C E and defined field.


I am trying the following but I am getting error:

DEFINE FILE HOLD1
MISC/P20.2MBC = B + D;
END

TABLE FILE HOLD1
PRINT LVL_1_ABBR_N
PRINT MISC
------


Could you please help me?

Thanks
Deep


WebFocus 7.1.4, Windows Server 2005 , HTML/EXL/PDF
 
Posts: 35 | Registered: August 17, 2007Report This Post
Expert
posted Hide Post
Deep,

Get used to looking at the structure of HOLD files to help you through this type of question. You can use !TYPE HOLD1.MAS in your example to see the field names etc.

Then once you know that info then you can identify how to achieve what you need -

!TYPE HOLD1.MAS
TABLE FILE HOLD1
SUM COMPUTE BnD/I9 = E03 + E05;
    E02 AS 'A'
    E04 AS 'C'
    E06 AS 'E'
BY E01
END

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
Guru
posted Hide Post
Or
? HOLD HOLD1


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Expert
posted Hide Post
quote:
!TYPE HOLD1.MAS


That's a new one for me!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
For me too, I always used ? hold...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Tony,

Using your !TYPE, I get the following (7.6.1)

APP HOLD EXAMPLES
-RUN ? PATH
FILEDEF TESTDATA DISK C:\IBI\APPS\EXAMPLES\TESTDATA.TXT
-RUN
BASEAPP = C:\ibi\apps\baseapp;
APPHOLD = C:\ibi\apps\examples;
APPPATH = C:\ibi\apps\ibisamp;
C:\ibi\apps\baseapp;
C:\ibi\apps\examples;
? FILEDEF
SET ASNAMES=ON
TABLE FILE TESTDATA
LIST
T_GIFT
BY T_ACCT
BY HIGHEST T_DATE
ON TABLE HOLD AS H1
END
-RUN
Lname Device Lrecl Recfm Append Filename
============================================================
TESTDATA DISK 0 V C:\IBI\APPS\EXAMPLES\TESTDATA.
TXT
0 NUMBER OF RECORDS IN TABLE= 26 LINES= 26
!TYPE H1.MAS
-EXIT
The system cannot find the file specified.


But, when I ?FF H1, I get:

APP HOLD EXAMPLES
-RUN
? PATH
FILEDEF TESTDATA DISK C:\IBI\APPS\EXAMPLES\TESTDATA.TXT
-RUN
BASEAPP = C:\ibi\apps\baseapp;
APPHOLD = C:\ibi\apps\examples;
APPPATH = C:\ibi\apps\ibisamp;
C:\ibi\apps\baseapp;
C:\ibi\apps\examples;
? FILEDEF
SET ASNAMES=ON
TABLE FILE TESTDATA
LIST
T_GIFT
BY T_ACCT
BY HIGHEST T_DATE
ON TABLE HOLD AS H1
END
-RUN
Lname Device Lrecl Recfm Append Filename
============================================================
TESTDATA DISK 0 V C:\IBI\APPS\EXAMPLES\TESTDATA.
TXT
0 NUMBER OF RECORDS IN TABLE= 26 LINES= 26
?FF H1
-EXIT
  
FILENAME=  H1
 T_ACCT        E01           A04
 T_DATE        E02           YYMD
 LIST          E03           I5
 T_GIFT        E04           D12.2

How does !TYPE work for you, I thought ! was a shortcut for UNIX???


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

As has been mentioned before Wink the plink "!" is the shorthand for a system command. In windoze you can use either ! or CMD and as such ! TYPE filename.mas would dump the contents of the .mas file to the "sysout". As a consequence you see much more than ?FF filename gives you.

At the end of the day, it's down to personal preference and the occasion. There are times that I use CMD TYPE filename.mas and others when I would use ?FF filename. In this instance I suggested ! TYPE or CMD TYPE to give more info about the structure of the hold file, that's all.

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
T,

Thanks for the clarification. Unfortunately, I keep getting:

The system cannot find the file specified.

Oh well, stick with ?FF

Again, THANKS!


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

Using this code -
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY
SUM RCOST
    DCOST
 BY COUNTRY
 BY CAR
ON TABLE HOLD AS HOLD1
END
-RUN
?FF HOLD1
CMD TYPE HOLD1.MAS
! TYPE HOLD1.MAS

I get this output -
 NUMBER OF RECORDS IN TABLE=       18  LINES=     10
 FILENAME=  HOLD1
 COUNTRY       E01           A10
 RETAIL_COST   E02           D7
 DEALER_COST   E03           D7
 CAR           E04           A16
 RETAIL_COST   E05           D7
 DEALER_COST   E06           D7
 FILENAME=HOLD1   , SUFFIX=FIX     , $
 SEGMENT=HOLD1, SEGTYPE=S1, $
 FIELDNAME=COUNTRY, ALIAS=E01, USAGE=A10, ACTUAL=A12,
 MISSING=ON, $
 FIELDNAME=RETAIL_COST, ALIAS=E02, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $
 FIELDNAME=DEALER_COST, ALIAS=E03, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $
 FIELDNAME=CAR, ALIAS=E04, USAGE=A16, ACTUAL=A16,
 MISSING=ON, $
 FIELDNAME=RETAIL_COST, ALIAS=E05, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $
 FIELDNAME=DEALER_COST, ALIAS=E06, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $
 FILENAME=HOLD1   , SUFFIX=FIX     , $
 SEGMENT=HOLD1, SEGTYPE=S1, $
 FIELDNAME=COUNTRY, ALIAS=E01, USAGE=A10, ACTUAL=A12,
 MISSING=ON, $
 FIELDNAME=RETAIL_COST, ALIAS=E02, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $
 FIELDNAME=DEALER_COST, ALIAS=E03, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $
 FIELDNAME=CAR, ALIAS=E04, USAGE=A16, ACTUAL=A16,
 MISSING=ON, $
 FIELDNAME=RETAIL_COST, ALIAS=E05, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $
 FIELDNAME=DEALER_COST, ALIAS=E06, USAGE=D7, ACTUAL=D08,
 MISSING=ON, $

Platform and release as per current client details in my signature!

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
Btw, windoze platform accepts !TYPE or ! TYPE

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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Using values from HOLD file

Copyright © 1996-2020 Information Builders