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     Getting no diff. in table and tablef [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Getting no diff. in table and tablef [SOLVED]
 Login/Join
 
<Toshu>
posted
TABLE FILE IPFILE1
PRINT SNO FNAME LNAME
BY FNAME NOPRINT
ON TABLE HOLD AS FILE1
END
TABLEF FILE FILE1
PRINT SNO FNAME LNAME
ON TABLE HOLD AS FILE2
END
-RUN
Output is exact in above cases. No internal sorting is observed in tablef
Still learning!

This message has been edited. Last edited by: <Toshu>,
 
Report This Post
<JG>
posted
It All depends on the sort order of IPFILE1 and FILE1.

If FILE1 is already sorted by FNAME then here will be no difference in the outputs.
 
Report This Post
Virtuoso
posted Hide Post
Toshu,
As per your first TABLE command, you produce the FILE1 output, sorted by FNAME.
Then your TABLEF command just prints the fields in FILE1, so of course you get the same outputs.
If instead your TABLEF runs on IPFILE1, unless this file is presorted by FNAME, you should get different outputs.


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
<Toshu>
posted
Hi Danny/JG,
Input dataset: TS536W.FOCUS.IPFILE1

05TUSHAR SAXENA 123456
02NIREN KUMAR 321234
02RAM NAYAK 999999
04VINAY SINGAL 111111
01VENKAT DEVRA 000001
05TUSHAR MISHRA 123456
07NIREN KUMAR 000001
08RAM SINGH 000001
09VINAY SINGAL 111111
10VENKAT DEVRA 000001
11KAWALD SINGH 999999


FOCUS CODE:

TABLEF FILE IPFILE1
PRINT SNO FNAME LNAME
ON TABLE HOLD AS FILE1
-* I used without holding as well to check the outout in system log. It was same.
END

Output DATASET: TS536W.FOCUS.FILE1
SNO FNAME LNAME
--- ----- -----
5 TUSHAR SAXENA
2 NIREN KUMAR
2 RAM NAYAK
4 VINAY SINGAL
1 VENKAT DEVRA
5 TUSHAR MISHRA
7 NIREN KUMAR
8 RAM SINGH
9 VINAY SINGAL
10 VENKAT DEVRA
11 KAWALD SINGH

MASTER of IPFILE1:
FILE=FILE1 ,SUFFIX=FIX, DATASET='TS536W.FOCUS.IPFILE1'
SEGNAME=FILE1 ,SEGTYPE=S0
FIELDNAME =SNO ,E01 ,USAGE=I2 ,A2 ,$
FIELDNAME =FNAME ,E02 ,USAGE=A7 ,A7 ,$
FIELDNAME =LNAME ,E03 ,USAGE=A7 ,A7 ,$
FIELDNAME =ID ,E04 ,USAGE=A6 ,A6 ,$

Why the o/p is not sorted internally?
Although when using By, it is not sorting data, which is true for TABLEF.

Any suggestions please!
 
Report This Post
Virtuoso
posted Hide Post
Toshu,

TABLEF does not sort. That is its raison d'etre.

Your file is a sequential file (SUFFIX=FIX) so TABLEF will read the records in sequence and output them in the same order.

What is it that you want to obtain?


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
Expert
posted Hide Post
FYI,

If the source is a relational table the BY fields are passed and the RDBMS sorts the results.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<Toshu>
posted
Thanks everyone! I got that. Smiler
 
Report 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     Getting no diff. in table and tablef [SOLVED]

Copyright © 1996-2020 Information Builders