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     [SOLVED]Webfocus "? TABLE HOLD" command?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Webfocus "? TABLE HOLD" command?
 Login/Join
 
Member
posted
I was working with a consultant on a Webfocus report and she used a fancy little trick along the lines of

-SQL stuff
? TABLE HOLD XYZ
-EXIT

This was right after the SQL pass through.

When she ran the report it showed at the bottom the "table"/matrix stucture that was generated which can be handy. I tried running this command and couldnt get the same results?

Has anyone used this command before?

Thanks

This message has been edited. Last edited by: Rodney Chan,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 26 | Registered: October 27, 2011Report This Post
Master
posted Hide Post
Hi Rodney,

The WebFOCUS Query commands, are not tricks, but more like treats! (OK, I'm getting in the Halloween spirit.)

Sound like you want to see the components of a HOLD file, you just created.

If so, the syntax is:
? HOLD name_of_the_HOLD_file

Dave




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
And if you want to see the fields in that file: "?FF name_of_the_HOLD_file"
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Hi Rodney,

Alternatively you could use: ?FF tablename

You'll get similar results that don't require the "? HOLD..." to occur after the HOLD command. Plus you could reference a table in another application folder such as ?FF appfolder/tablename that may have been made at some other time.

Later,

Norb


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
 
Posts: 242 | Location: Minneapolis | Registered: February 16, 2006Report This Post
Member
posted Hide Post
Yes, As Norb said, that command will help you to get Hold file details.

?FF

Thanks,
Hari.


Harikrishna.V,
Bangalore.
 
Posts: 8 | Location: BANGALORE, INDIA. | Registered: October 25, 2011Report This Post
Member
posted Hide Post
I think text between left arrow and right arrow will not come i guess. Smiler

I have actually written below .

?FF TABLE/MFD/HOLDFILENAME


Harikrishna.V,
Bangalore.
 
Posts: 8 | Location: BANGALORE, INDIA. | Registered: October 25, 2011Report This Post
<FreSte>
posted
Using this technique on a HOLD-file can be very useful (specially when creating dynamic reports)

CHECK FILE CAR HOLD AS HLDCAR

TABLE FILE HLDCAR
  PRINT 
    FIELDNAME
    FORMAT
    FLDNO

  BY LEVEL
  BY SEGNO
  BY SEGNAME
  BY PARENT

  ON TABLE SET LINES 99999
  ON TABLE SET TITLES OFF
  ON TABLE SET PAGE NOPAGE
  ON TABLE SET HTMLCSS ON

ON TABLE SET STYLE *
TYPE=REPORT   ,UNITS=PTS   ,FONT='VERDANA', SIZE=8          ,$
TYPE=REPORT   ,BORDER=1    ,BORDER-COLOR=RGB(210 210 210)   ,$
TYPE=TITLE    ,STYLE=BOLD  ,BACKCOLOR=RGB(230 230 230)      ,$
TYPE=DATA     ,TOPGAP=2    ,BOTTOMGAP=2                     ,$
TYPE=DATA     ,BACKCOLOR=(RGB(255 255 255) RGB(245 245 245)),$
ENDSTYLE
END

This message has been edited. Last edited by: <FreSte>,
 
Report This Post
Master
posted Hide Post
ooooohh - I like it Fred! Smiler

That's a little gem.

I assume it will work with any file, not just holds ?


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Member
posted Hide Post
quote:
Using this technique on a HOLD-file can be very useful (specially when creating dynamic reports)

CHECK FILE CAR HOLD AS HLDCAR

TABLE FILE HLDCAR
PRINT
FIELDNAME
FORMAT
FLDNO

BY LEVEL
BY SEGNO
BY SEGNAME
BY PARENT

ON TABLE SET LINES 99999
ON TABLE SET TITLES OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET HTMLCSS ON

ON TABLE SET STYLE *
TYPE=REPORT ,UNITS=PTS ,FONT='VERDANA', SIZE=8 ,$
TYPE=REPORT ,BORDER=1 ,BORDER-COLOR=RGB(210 210 210) ,$
TYPE=TITLE ,STYLE=BOLD ,BACKCOLOR=RGB(230 230 230) ,$
TYPE=DATA ,TOPGAP=2 ,BOTTOMGAP=2 ,$
TYPE=DATA ,BACKCOLOR=(RGB(255 255 255) RGB(245 245 245)),$
ENDSTYLE
END

This message has been edited. Last edited by: FreSte, October 30, 2011 10:55 AM


WebFOCUS 7.6.9 / 7.7.02
All output formats


Bear with me as Im a bit fresh at WebFocus, but where would I be able to use this?

Im not sure where in particular I could use this, i tried running it in Webfocus and I see output but not sure how to break it down and assimilate it into a report Im working on

Thanks in advance, this forum is awesome!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 26 | Registered: October 27, 2011Report This Post
Master
posted Hide Post
quote:
Using this technique on a HOLD-file can be very useful
Thank you Fred. This time-saver will quickly become one of my favorite utilities. (Sometimes, I don't have the time to save off and retrieve the MFD for the HOLD file.)
quote:
assume it will work with any file, not just holds ?
Yes, in Fred's example, the technique is reading the sample database CAR MFD.
quote:
Bear with me as Im a bit fresh at WebFocus, but where would I be able to use this?
You wouldn't necessarily use it within the reports you are about to create for your user community. Instead this will be tool you, and your fellow developers can rely upon, to support your development activities.

This message has been edited. Last edited by: David Briars,




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
<FreSte>
posted
OK, give a a day or two and I'll try to make an example
that will show what I mean.

-Fred-
 
Report This Post
<FreSte>
posted
OK, I thought I had a good example somewhere on my laptop; didn't find it.
So, below is a simple example. It's a report with the MPG as an across and
the SEATS as a BY-field and let's say for some reason you would like to have
an empty column after every second column (I know, who wants that, but it demos quite ok).

This example (in a way) writes itself. You can include a HOLD-file in the same fex
that's generating it.
Hope this will give you an idea on what can be achieved with techniques like this.

-Fred-


SET ASNAMES = ON
TABLE FILE CAR
  SUM
    DEALER_COST AS ''
  BY SEATS
  ACROSS MPG
  ON TABLE HOLD AS HLD1
  ON TABLE SET HOLDLIST PRINTONLY
END
-RUN

CHECK FILE HLD1 HOLD AS HLD2

TABLE FILE HLD2
  PRINT
    FIELDNAME
    COMPUTE COUNTER/I2 = IF LAST COUNTER EQ 1 THEN 0 ELSE 1; NOPRINT
    COMPUTE SPACER/A100 = IF COUNTER EQ 0 THEN 'COMPUTE SPACER/A1 = ''''; AS '''' ' ELSE '';
  WHERE FLDNO GT 1;
  ON TABLE SET HOLDLIST PRINTONLY
  ON TABLE SAVE AS HLDINCL FORMAT ALPHA
END
-RUN


TABLE FILE HLD1
SUM
-INCLUDE HLDINCL
BY SEATS

ON TABLE SET LINES 99999
ON TABLE SET TITLES OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET HTMLCSS ON

ON TABLE SET STYLE *
TYPE=REPORT     ,UNITS=PTS   ,FONT='VERDANA', SIZE=8        ,$
TYPE=REPORT     ,BORDER=1    ,BORDER-COLOR=RGB(210 210 210) ,$
TYPE=TITLE      ,STYLE=BOLD  ,JUSTIFY=CENTER, BACKCOLOR=RGB(230 230 230)    ,$
TYPE=DATA       ,TOPGAP=2    ,BOTTOMGAP=2                   ,$
TYPE=DATA       ,BACKCOLOR=(RGB(255 255 255) RGB(245 245 245)),$
TYPE=DATA       ,COLUMN=RUNTOT ,backcolor=silver, color=white,$
ENDSTYLE
END
-RUN
 
Report This Post
Virtuoso
posted Hide Post
Nice one!

I turned it into a procedure, so that you can call it with just:
EX INSPECT HOLD=CAR


I added a heading and wrote the temporary stuff to FOCCACHE, so to use this procedure you need to have FOCCACHE enabled on your server.

The procedure is:
-* File inspect.fex
-DEFAULT &HOLD = CAR
FILEDEF TMPINSPCT DISK FOCCACHE/INSPECT
CHECK FILE &HOLD HOLD AS TMPINSPCT
-RUN

TABLE FILE TMPINSPCT
  PRINT 
    FIELDNAME
    FORMAT
    FLDNO

  BY LEVEL
  BY SEGNO
  BY SEGNAME
  BY PARENT

  HEADING
  "Master<+0>: &HOLD"

  ON TABLE SET LINES 99999
  ON TABLE SET TITLES OFF
  ON TABLE SET PAGE NOPAGE
  ON TABLE SET HTMLCSS ON

ON TABLE SET STYLE *
TYPE=REPORT   ,UNITS=PTS   ,FONT='VERDANA', SIZE=8          ,$
TYPE=REPORT   ,BORDER=1    ,BORDER-COLOR=RGB(210 210 210)   ,$
TYPE=HEADING  ,STYLE=BOLD  ,BACKCOLOR=RGB(230 230 230)      ,$
TYPE=TITLE    ,STYLE=BOLD  ,BACKCOLOR=RGB(230 230 230)      ,$
TYPE=DATA     ,TOPGAP=2    ,BOTTOMGAP=2                     ,$
TYPE=DATA     ,BACKCOLOR=(RGB(255 255 255) RGB(245 245 245)),$
ENDSTYLE
END


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
Sweet! Thanks FreSte and Wep5622. This is certainly a nice one to have in my "util" app folder.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
In our own version I added the TITLE column to the output as well. Our column names are limited to 6 characters (apparently for compatibility reasons), which isn't all that descriptive!

One thing I'd like to add is the output of
WHENCE &HOLD MASTER

Any suggestions?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
<FreSte>
posted
Wep,

Based on a previous post (getting all the ampers in a report), you can do almost the same with a small modification (the final output needs to be "cleaned" a bit)

-Fred-

-DEFAULTH &MASTER = 'CAR'

-SET &TEMPDIR = TEMPPATH(60,'A60');
-SET &TRACEFILE = &TEMPDIR || 'trace.trc';

SET TRACEOFF = ALL
SET TRACEON = ALL
SET TRACESTAMP=OFF
SET TRACEUSER=&TRACEFILE
-RUN

WHENCE &MASTER MASTER

SET TRACEOFF = ALL
-RUN

FILEDEF MASTER DISK TRACE.MAS
FILEDEF TRACE DISK TRACE.TRC
-RUN

-WRITE MASTER FILENAME=TRACE, SUFFIX=FIX
-WRITE MASTER SEGNAME=TRACE
-WRITE MASTER FIELDNAME=LINE, FORMAT=A200, ACTUAL=A200, $
-RUN

DEFINE FILE TRACE
  RESULT/A155 = SUBSTR(200,LINE,45,200,155,RESULT);
END
TABLE FILE TRACE
  PRINT
    RESULT
  IF LINE CONTAINS 'NGtrEvnt'
  IF RESULT CONTAINS 'mas'
END
-RUN
 
Report This Post
Virtuoso
posted Hide Post
I was hoping for a ...less inelegant solution. Good out-of-the-box thinking, though!

ISTM that the LINE with 'nwsig' and 'mas' would actually be a better candidate (no trailing double-quote). Even then, as soon as the length of the line gains a digit (>99 characters in this case, which is quite possible with file paths), our offset for reading the file name is off by one. At 1000 or more characters it's off by 2, as unlikely as it seems to reach such long paths... I don't think Windows supports path names longer than 9999 characters (AFAIK it's at 1024), so that's about the longest we'll see. Paths shorter than 10 characters also seem unlikely, although not impossible ("C:\a\a.mas" is already too long, but "/a/a.mas" on a UNIX system would do it).

It's a bit unfortunate that WHENCE doesn't have a HOLD option, while CHECK FILE does. I think it would be useful Smiler


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
<FreSte>
posted
What about this one Smiler

-Fred-


-DEFAULTH &MASTER = 'car'

SQL FMI SET SYSFILES MASTER
TABLE FILE SYSFILES
PRINT PHNAME
WHERE UPCASE(64, FILENAME, 'A64') EQ UPCASE(&MASTER.LENGTH, '&MASTER', 'A&MASTER.LENGTH');
END
 
Report This Post
Virtuoso
posted Hide Post
Awesome, Fred.

With that we now have:
-* File inspect.fex
-DEFAULTH &MASTER = CAR
SET HOLDLIST = PRINTONLY

SQL FMI SET SYSFILES MASTER
TABLE FILE SYSFILES
PRINT COMPUTE FOOTING/A104 = '"Physical location:<+0>'|PHNAME|'"';
WHERE UPCASE(64, FILENAME, 'A64') EQ UPCASE(&MASTER.LENGTH, '&MASTER', 'A&MASTER.LENGTH');
ON TABLE HOLD AS FOCCACHE/MASTERPATH FORMAT ALPHA
END
-RUN

FILEDEF TMPINSPCT DISK FOCCACHE/INSPECT
CHECK FILE &MASTER HOLD AS TMPINSPCT
-RUN

TABLE FILE TMPINSPCT
  PRINT
    FIELDNAME
    FORMAT
    FLDNO
	TITLE
-*	HELPMESSAGE

  BY LEVEL
  BY SEGNO
  BY SEGNAME
  BY PARENT

  HEADING
  "Master<+0>: &MASTER"
  FOOTING
-INCLUDE FOCCACHE/MASTERPATH.ftm

  ON TABLE SET LINES 99999
  ON TABLE SET TITLES OFF
  ON TABLE SET PAGE NOPAGE
  ON TABLE SET HTMLCSS ON

ON TABLE SET STYLE *
TYPE=REPORT   ,UNITS=PTS   ,FONT='VERDANA', SIZE=8          ,$
TYPE=REPORT   ,BORDER=1    ,BORDER-COLOR=RGB(210 210 210)   ,$
TYPE=HEADING  ,STYLE=BOLD  ,BACKCOLOR=RGB(230 230 230)      ,$
TYPE=TITLE    ,STYLE=BOLD  ,BACKCOLOR=RGB(230 230 230)      ,$
TYPE=DATA     ,TOPGAP=2    ,BOTTOMGAP=2                     ,$
TYPE=DATA     ,BACKCOLOR=(RGB(255 255 255) RGB(245 245 245)),$
TYPE=FOOTING  ,ITEM=1      ,STYLE=BOLD                      ,$
ENDSTYLE
END


This is also a report that's quite convenient to run with parameter prompting. That way you can enter one master name after another in the prompting form and get the description right away. Saves typing a procedure call and the time spent by the system to start up a browser window, as it's already there.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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     [SOLVED]Webfocus "? TABLE HOLD" command?

Copyright © 1996-2020 Information Builders