Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Extraction of FOCUS database
Go
New
Search
Notify
Tools
Reply
  
Extraction of FOCUS database
 Login/Join
 
Member
posted
Hi All,

While extracting the data fron the FOCUS database and put into the flat file, I want delimit each field with delimiter"~". Can any one help me, how to separate the data with delimiter in the O/P file. I am extracting the data with segment wise.

TABLE FILE EMPLOYEE
PRINT EMPNBR
SEG.EMPNBR
SEG.EMPNAME
SEG.EMPNAM1
SEG.EMPBRANCH

Thanks,
Rajesh
 
Posts: 14 | Registered: January 19, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Should be pretty straightforward. Here's one solution:

DEFINE FILE EMPLOYEE
DELIM/A1='~';
END
TABLE FILE EMPLOYEE
PRINT
EMPNBR DELIM
EMPNAME DELIM
EMPNAM1 DELIM
.
.
ON TABLE HOLD FORMAT ALPHA
END


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Member
posted Hide Post
If I print Field by Field its creating some issue when the number of fields are more. Hence I wanted to print all the fields in the segment using seg.. In this scenario is there any command to delimit the fields in the segment, even though I am printing the whole segment at once.

Thanks
Rajesh
 
Posts: 14 | Registered: January 19, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I don't think so. The only way to get something in between fields in a flat file is to put it there yourself. If this is relating to your other post on getting data into SQL server, just try
TABLE FILE filename
PRINT *
ON TABLE HOLD FORMAT SQLMSS
END

without knowing limitations of your platforms or environments, of course.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Master
posted Hide Post
Another way, is do a HOLDFORAT TAB or COM. Then have a .MAS that describes the data as one field. Use the CTRAN function to convert the tabs or commas to ~.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 950 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Extraction of FOCUS database

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.