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     How to get the output in the mentioned format?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to get the output in the mentioned format?
 Login/Join
 
Silver Member
posted
hi

I have a input file with 5 fields

roll no. name phone email fax no.
------- ------ ------- --------- --------
111 aaa 1234567 a@yyy.com 1234567
222 bbb 2345678
333 ccc c@yyy.com


Now in the output file I need to print the fields in following format

roll no. NAME name
PHONE phone
EMAIL email
FAX NO. fax no.

NOTE:- That the words written with caps on are labels not fields and the one with caps off
are fields.

the output should be as follows:-

111 NAME aaa
111 PHONE 1234567
111 EMAIL a@yyy.com
111 FAX NO. 1234567
222 NAME bbb
222 PHONE 2345678
333 NAME ccc
333 EMAIL c@yyy.com

Note:- The fields which are null for a particular roll no. should not be printed
As roll no. 222 does'nt have email and fax field so they are not printed in the output.
 
Posts: 40 | Location: Chennai, India | Registered: January 31, 2007Report This Post
Virtuoso
posted Hide Post
did you download the manual?

try the command "OVER"

so

TABLE FILE CAR
PRINT 
     COUNTRY AS 'c:' OVER 
     CAR AS 'x:' OVER 
     MODEL AS 'm:' OVER 
     COMPUTE SPACE/A1 = ''; AS ''
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
END 




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
Virtuoso
posted Hide Post
your second question is a select:

WHERE EMAIL NE '';

And if you want to repeat the ROLLNO
PRINT 
ROLLNO AS ''  NAME OVER
ROLLNO AS '' PHONE OVER
ROLLNO AS '' EMAIL OVER
ROLLNO AS '' FAXNO 


But if you just want to suppress only lines when the value is empty you have to do this in a complete other way.
First put all the data into a new hold file per field.
But than you need the fields to have the same picture (p.e. A25)

-SET ASNAMES= ON
TABLE FILE XXX
PRINT ROLLNO 
COMPUTE FNAME/A10="PHONE" 
PHONE AS 'FVALUE'
ON TABLE HOLD AS HOLDPHON
WHERE PHONE NE '';
END
TABLE FILE XXX
PRINT ROLLNO 
COMPUTE FNAME/A10="EMAIL" 
EMAIL AS 'FVALUE'
ON TABLE HOLD AS HOLDMAIL
WHERE EMAIL NE '';
END
etc


Then combine the HOLD files

TABLE FILE HOLDMAIL
PRINT ROLLNO FNAME FVALUE
ON TABLE HOLD
MORE
FILE HOLDPHON
MORE
FILE HOLDFAX
MORE
...
END

TABLE FILE HOLD
PRINT *
END


Let me know if it works

and download the manual, it will help you a lot.

Frank




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
Silver Member
posted Hide Post
Ya Frank it worked .Thanx a lot.
And ya I downloaded the manual and i m going through it.


FOCUS 7.1.1/ MF(OS/390)
 
Posts: 40 | Location: Chennai, India | Registered: January 31, 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     How to get the output in the mentioned format?

Copyright © 1996-2020 Information Builders