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.
In a input file i have 2 fields as such roll no. status 01 y 01 01 N 02 N 02 N 03 03 03 04 Y 04 Y 04 N
Now in the output file i need to print roll no and status only once for each roll no and the status should be 'Y' if any one of the particular roll no. has 'Y' else it should print 'N' Ex - The ouput should be roll no. status 01 Y 02 N 03 N 04 Y as roll no. 1 has atleast one status as 'Y" so its output status should be 'Y' roll no 2 has no status as 'Y' so its output status should be 'N' Similarly as roll no. 3 has no status as 'Y' so its output should be 'N' and as roll no. 4 has atleast one status as 'Y' so its output status should be 'Y'
So can u sugest some solution
FOCUS 7.1.1/ MF(OS/390)
Posts: 40 | Location: Chennai, India | Registered: January 31, 2007
FILEDEF TEMP2 DISK C:\IBI\APPS\TEMP\TEMP2.FTM
DEFINE FILE TEMP2
FINAL_STATUS/A1 =
IF STATUS EQ 'Y' THEN 'Y' ELSE
IF ROLL_NO EQ LAST ROLL_NO AND STATUS IN (' ','N') AND FINAL_STATUS NE 'Y' THEN 'N' ELSE
IF ROLL_NO NE LAST ROLL_NO AND STATUS IN (' ','N') THEN 'N' ELSE FINAL_STATUS ;
END
TABLE FILE TEMP2
SUM
FINAL_STATUS
BY ROLL_NO
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
FILEDEF MYFILE DISK C:\IBI\APPS\DIALOGUE_MANAGER\MYFILE.TXT
-RUN
TABLE FILE MYFILE
PRINT
STATUS
COMPUTE
NEWSTAT1/I1=IF LAST ROLLNUM NE ROLLNUM THEN 1 ELSE 0;
GOODSTAT/A1=IF NEWSTAT1 EQ 1 AND STATUS EQ 'Y' THEN 'Y' ELSE 'N';
WHERE TOTAL NEWSTAT1 EQ 1
BY ROLLNUM
END
The data: myfile.txt 01 Y 01 01 N 02 N 02 N 03 03 03 04 Y 04 Y 04 N
Hope this helps.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
xx/a1 = if ((rollno eq last rollno) and (last status eq 'y') then 'y' else if ((rollno eq last rollno) and (status eq 'y')) then 'y' else if (rollno eq last rollno) then 'n';
you can make this more nested, but i elongated to make it more legible. Hope it helps...