February 19, 2007, 05:16 AM
<Raghuraman>focus
Hi
I have a file like a
id cldir1 cldir2 cldir3
1 aaaaa bbbbb ccccc
i want output lia
id cdes
1 aaaaa
1 bbbbb
1 ccccc
February 19, 2007, 06:04 AM
FrankDutchRaghuraman
this discussion site is ment for focus users
It might help if you NOT open your question with the subject "FOCUS" that is not very helpfull
think about what your problem is and try to put that in the subject.
Then first search in this site to find similar problems and look if they might be helpfull.
This question is brought up by someone else and I have given him an answer.
How about a digital manual?
look for the command "OVER"
Frank
February 19, 2007, 10:04 AM
Francis MarianiPlease heed Frank's advice.
Meanwhile, OVER will not work in a HOLD file.
Here's a working example similar to what you require:
SET ASNAMES=ON
TABLE FILE CAR
PRINT
COUNTRY/A20 AS 'TEXT'
BY COUNTRY
ON TABLE HOLD AS H001
RUN
PRINT
CAR/A20 AS 'TEXT'
BY COUNTRY
ON TABLE HOLD AS H002
RUN
PRINT
MODEL/A20 AS 'TEXT'
BY COUNTRY
ON TABLE HOLD AS H003
END
TABLE FILE H001
PRINT TEXT
BY COUNTRY
ON TABLE HOLD AS H100
MORE
FILE H002
MORE
FILE H003
END
TABLE FILE H100
PRINT *
END
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
February 19, 2007, 03:47 PM
Alan BTry the McGuyver technique that I put into this topic:
1 Line 2 Records but adjusting the numbering to 3 rather than 2.
February 19, 2007, 05:27 PM
LeahThere are many ways to solve your problem as has been shown. The best method depends on what you really want to do with the output and your level of comfort with the focus code. I like the McGyver technique, but other times just use computes or defines to handle the problem. I've never used 'more' mostly because I never had training on the option. It is quite useful as well.
So back to my first statemen, what are you wanting to do with the output once generated?