Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Focus report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Focus report
 Login/Join
 
Member
posted
Hi,
My requirement is I have region,agent name and airline codes and booking tickets count. I want to create report by reading file though focus for mainframes.


Input file
Chicago Tom Delta 10
Chicago Tom AA 05
Chicago Jack AA 04
Newyork Jenny AF 01

Report file:
Region: Chicago
Agent: Tom
Airline: Delta
Booking count: 10

Region : chicago
Agent : All
Airline : Delta
Booking count : 10

Region : Chicago
Agent : Tom
Airline: AA
Booking count : 05

Region : Chicago
Agent : jack
Airline : aa
Booking count:04

Region : Chicago
Agent : all
Airline : AA
Booking count : 09

Region : Chicago
Agent : ALL
Airline : ALL
Booking count : 19

Similarly for New York region etc.please help me.

This message has been edited. Last edited by: <Kathryn Henning>,


Focus 7.6
 
Posts: 3 | Registered: August 04, 2015Report This Post
Member
posted Hide Post
Try:
TABLE FILE master_file_name
PRINT BOOKING_COUNT NOPRINT
BY REGION NOPRINT
BY AGENT NOPRINT
BY AIRLINE NOPRINT
BY BOOKING_COUNT NOPRINT
ON BOOKING_COUNT SUBHEAD
"Region: "Agent: "Airline: "Booking count: " "
END
 
Posts: 15 | Location: Houston TX | Registered: March 22, 2010Report This Post
Master
posted Hide Post
I love the OVER command.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Member
posted Hide Post
For some reason post did not come out correctly. Basically after the colon(Smiler space, there is a less than sign then the name of the field.

ON BOOKING COUNT SUBHEAD
"Region: <REGION"
"Agent: <AGENT"
"Airline: <AIRLINE"
"Booking Count: <BOOKING_COUNT"
" "
 
Posts: 15 | Location: Houston TX | Registered: March 22, 2010Report This Post
Member
posted Hide Post
Thanks for quick response.
Code: Below code is creating duplicate on every airline last record.
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)


Focus 7.6
 
Posts: 3 | Registered: August 04, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Focus report

Copyright © 1996-2020 Information Builders