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.
Code: Below code is creating duplicate on every airline last record.Please help me.I am running out of time
TABLE FILE MPARLN
"Region <33 : <35 "Agent <33 : <35 "Airline CODE <33 : <35 "--------------------------------- ---------------------" " " "# OF BOOKED TICKETS : <35 "# OF REFUNDED TICKETS : <35 BY Region-NAME NOPRINT PAGE-BREAK BY Agent-LST-NAME NOPRINT PAGE-BREAK BY AIRLINE-CODE NOPRINT PAGE-BREAK ON AIRLINE-CODE SUBFOOT ""Region <33 : <35 "Agent <33 : <35 ALL" "Airline CODE <33 : <35 "--------------------------------- ---------------------" " " "# OF BOOKED TICKETS : <35 "# OF REFUNDED TICKETS : <35 ON Region-NAME SUBFOOT ""Region <33 : <35 "Agent <33 : <35 ALL" "Airline CODE <33 : <35 ALL" "--------------------------------- ---------------------" " " "# OF BOOKED TICKETS : <35 "# OF REFUNDED TICKETS : <35 ON TABLE SUBFOOT ""Region <33 : <35 ALL" "Agent <33 : <35 ALL" "Airline CODE <33 : <35 ALL" "--------------------------------- ---------------------" " " "# OF BOOKED TICKETS : <35 "# OF REFUNDED TICKETS : <35 The order i should display in report was. Input file: CHICAGO TOM DELTA 10 CHICAGO TOM AA 05 CHICAGO JACK AA 04 NEW YORK BOB AF 20
Report:
1. Read first record from input file and write to report, next read second record If REC2.REgion = REC1.Region and REC2.Airline= REC1.Airline and Agent name is different(Agent name will be different for same region). Write second record to report. ELSE IF REC2.Region = REC1.Region and REC2.Airline <> REC1.Airline and agent name is different then
Region: CHICAGO //* FIRST RECORD WRITTEN// AGENT: TOM AIRLINE: DELTA -------------------------------- OF BOOKED TICKETS : 10
Region: CHICAGO //* SINCE 2nd REC AIRLINE IS DIFFERENT WE HAVE TO SUM ALL AGENTS TKTS FOR DELTA FOR REGION CHICAGO and hardcode Agent = ALL// AGENT: ALL AIRLINE: DELTA -------------------------------- OF BOOKED TICKETS : 10
Now write second Region: CHICAGO //* SECOND RECORD WRITTEN// AGENT: TOM AIRLINE: AMERICAN AIRLINES -------------------------------- OF BOOKED TICKETS : 05
Since REC3.Region = REC2.Region and REC3.Airline = REC2.Airline and agent name is different write third record to report file.
Region: CHICAGO //* THIRD RECORD WRITTEN// AGENT: JACK AIRLINE: AMERICAN AIRLINES -------------------------------- OF BOOKED TICKETS : 04
Now REC4.REGION <> REC3.REGION, sum all REC1 american airline records.
Region: CHICAGO //* SINCE SECOND RECORD AIRLINE IS SAME AS THIRD AIRLINE WE HAVE TO SUM ALL AGENTS TICKETS FOR AA for region CHICAGO// AGENT: ALL AIRLINE: AMERICAN AIRLINES -------------------------------- OF BOOKED TICKETS : 09
Region: CHICAGO //* SUM OF ALL TICKETS BOOKED IN CHICAGO FOR ALL AIRLINES. AGENT: ALL AIRLINE: ALL -------------------------------- OF BOOKED TICKETS : 19(delta= 10 and aa=9 => 19)
Write record4 record.
Region: NEW YORK //* FIRST RECORD WRITTEN// AGENT: BOB AIRLINE: AIR FRANCE -------------------------------- OF BOOKED TICKETS : 20
Region: NEW YORK //*SUM ALL AGENTS TKTS FOR AF FOR REGION NEWYORK and hardcode Agent = ALL// AGENT: ALL AIRLINE: AIR FRANCE -------------------------------- OF BOOKED TICKETS : 20
Region: NEW YORK //* SUM OF ALL TICKETS BOOKED IN NEWYORK FOR ALL AIRLINES. AGENT: ALL AIRLINE: ALL -------------------------------- OF BOOKED TICKETS : 20
Region: ALL //* SUM OF ALL TICKETS BOOKED IN ALL REGIONS// AGENT: ALL AIRLINE: ALL -------------------------------- OF BOOKED TICKETS : 39(CHICAGO = 19 + NEWYORK= 20 = 39)This message has been edited. Last edited by: <Kathryn Henning>,
FILEDEF MAS_MPARLN DISK mparln.mas
FILEDEF MPARLN DISK mparln.ftm
-RUN
-WRITE MAS_MPARLN FILENAME=MPARLN, SUFFIX=COM, $
-WRITE MAS_MPARLN SEGNAME=MPARLN, $
-WRITE MAS_MPARLN FIELDNAME=REGION, FORMAT=A20, ACTUAL=A20, $
-WRITE MAS_MPARLN FIELDNAME=AGENT, FORMAT=A10, ACTUAL=A10, $
-WRITE MAS_MPARLN FIELDNAME=AIRLINE, FORMAT=A10, ACTUAL=A10, $
-WRITE MAS_MPARLN FIELDNAME=TICKETS, FORMAT=I5, ACTUAL=I5, $
-WRITE MPARLN CHICAGO,TOM,DELTA,10,$
-WRITE MPARLN CHICAGO,TOM,AA,5,$
-WRITE MPARLN CHICAGO,JACK,AA,4,$
-WRITE MPARLN NEW YORK,BOB,AF,20,$
-RUN
TABLE FILE MPARLN
SUM
TICKETS AS 'TOT_REGION'
BY REGION
SUM
TICKETS AS 'TOT_REGION_AIRLINE'
BY REGION
BY AIRLINE
SUM
TICKETS
BY REGION
BY AIRLINE
BY AGENT
ON TABLE HOLD
ON TABLE SET ASNAMES ON
END
DEFINE FILE HOLD
AIRLINE_AGENT/A20=AIRLINE||AGENT;
END
TABLE FILE HOLD
BY REGION NOPRINT
BY AIRLINE NOPRINT
BY AGENT NOPRINT
BY AIRLINE_AGENT NOPRINT
BY TOT_REGION NOPRINT
BY TOT_REGION_AIRLINE NOPRINT
BY TICKETS NOPRINT
ON REGION SUBFOOT
"Region: <REGION"
"Agent: ALL"
"Airline: ALL"
"Tickets Count: <TOT_REGION"
ON AIRLINE SUBFOOT
"Region: <REGION"
"Agent: ALL"
"Airline: <AIRLINE"
"Tickets Count: <TOT_REGION_AIRLINE"
ON AIRLINE_AGENT SUBFOOT
"Region: <REGION"
"Agent: <AGENT"
"Airline: <AIRLINE"
"Tickets Count: <TICKETS"
ON TABLE SUBFOOT
"Region: ALL"
"Agent: ALL"
"Airline: ALL"
"Tickets Count: <TOT.TICKETS"
END