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.
APP PATH IBISAMP
-RUN
DEFINE FILE CAR
ABC/A100= CAR || ',' || MODEL || ',' || BODYTYPE;
END
TABLE FILE CAR
BY ABC
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE HOLD AS HLD_1 FORMAT FOCUS
END
DEFINE FILE CAR
CNTR/I2=CNTR+1;
END
TABLE FILE CAR
PRINT
CNTR
COUNTRY
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT
CNTR
WHERE CNTR LE 3;
ON TABLE HOLD AS HLD_2 FORMAT FOCUS
END
SQL
SELECT A.COUNTRY,A.ABC, B.CNTR FROM HLD_1 A, HLD_2 B
;
TABLE
ON TABLE HOLD AS HLD_F
END
DEFINE FILE HLD_F
ABC_N/A30=GETTOK(ABC, 100, CNTR, ',', 30, ABC_N);
END
TABLE FILE HLD_F
BY COUNTRY
BY ABC NOPRINT
BY CNTR NOPRINT
BY ABC_N
END
here's a really simple way first with the CAR file FILEDEF HOUT DISK HOUT.FTM (APPEND SET ASNAMES = ON TABLE FILE CAR PRINT CAR MODEL IF COUNTRY IS 'ENGLAND' ON TABLE HOLD AS HOUT RUN PRINT CAR MODEL IF COUNTRY IS 'ITALY' ON TABLE HOLD AS HOUT RUN PRINT CAR MODEL IF COUNTRY IS 'W GERMANY' ON TABLE HOLD AS HOUT END -RUN TABLE FILE HOUT PRINT * END ... then with yours FILEDEF HOUT DISK HOUT.FTM (APPEND
SET ASNAMES = ON TABLE FILE whatever PRINT DEPT_ID City1 AS CITY ON TABLE HOLD AS HOUT RUN PRINT DEPT_ID City2 AS CITY ON TABLE HOLD AS HOUT RUN PRINT DEPT_ID City3 AS CITY ON TABLE HOLD AS HOUT ...lather rinse repeat END -RUN TABLE FILE HOUT PRINT CITY BY DEPTID END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I'm afraid I was a bit elliptic: I should explain the "EX -LINES". This is an internal method for creating a file, either on disk or in memory. Very useful when it is necessary to dynamically create a MASTER file within a procedure. Here is some documentation:
The EDAPUT command syntax is:
EX -LINES {n} EDAPUT {File Type},{App/}{File Name},{Create Type},{Create Location}
n : Number of lines including EDAPUT Line
File Type : Type of File (e.g. MASTER, FOCEXEC, ACCESS, etc )
App/ : Optionally Specify the APP directory
File Name : Name of the File without the extension
Create Type : Type of Create (CV=Create Variable, C=Create Fixed, A=Append to file)
Create Location : File Location (FILE=Write to Current Location, MEM=Write to Memory only)
Make good use of it.
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, 2006