i am working on a cics program.The functionality is, it will take all the information of the flights going from Mumbai to delhi and display on the screen where all the flight details will got to the protected filelds on the screen.
I myself need to decide the layout of the VSAm file and the fields which are there on the screen are; Airline, departure, arrival, stops, duration and price, The source to destination information as << flights from MUMBAI to DELHI>> is showing up properly on the current screen and these are the values entered by the user in the previous screen,
The fields declared as
001600 01 WS-COMMAREA.
001700 05 WS-EXEC-CTR PIC 9(2).
001710 05 WS-DEPARTURE-FROM PIC X(10).
001720 05 WS-DEPARTURE-DATE PIC X(10).
001730 05 WS-ARRIVAL-TO PIC X(10).
001740 05 WS-RETURN-DATE PIC X(10).
001741 05 WS-ADULTS PIC 9(01).
001742 05 WS-INFANTS PIC 9(01).
001743 05 WS-CHILDREN PIC 9(01).
001744 05 WS-FS-CTR PIC 9 VALUE 0.
please help me with the layout of the VSAm file and how can i display the information of Airline, departure, arrival, stops, duration and price for all teh flights from mumbai to delhi
Thanks for your quick response. Here is the scenario:
Screen 1: This screen has two options:
Option 1: One way Travel, Option 2: two way travel
if user selects option 1 then only souce and destination fields on the screen take sthe value along with the departure date and the return date with automatically get protected.
In this scenario there is no need to access any file or to get data from any file.
The values ( Souce name ex Mumbai, Destination Name ex Delhi, departure Date) will be passed via COMMAREA to the next program.
Screen2: Have the heading, Flights from <Souce name from the previous screen/program> to <Destination name from the previous screen/program> on <Date from the previous prog>
Now this is the screen where i need to use the VSAM file which already have values as i meantioned in my last post as "Airline Name, departure Time, arrival time, stops, duration and price". There is no hard and fast rule on this data as i need to prapare a VSAM file with the values for each and every field.
My questions is;
1) What will be the flight layout as primary key, I am thinking of taking a primary key as FLIGHT_NO <Will be adding an extra field in the file and fetch the reocords accordingly and not showing up any where> but how can I code the logic in the program to show the details of only those flight on the screen which are requested by the user in the previous screen with all the fields.
Joined: 06 Jun 2008 Posts: 8279 Location: Dubuque, Iowa, USA
Admit it -- you're a student and this is an assignment, right?
First, find a board. If you can't find a board, tape a large piece of blank paper to a wall. On one side of the board / paper, design the system and on the other side do the data design. From the initial transaction keyed in, what do you want displayed on the screen? Do some of those values come from a file? Do some of those values go to a file? What should the next screen displayed have on it? What data needs to be passed from program to program? Doing a good system design and data design will save you many, many, many hours of coding and testing and recoding.
Things to consider while designing:
1. using the IATA 3-character airport codes would save keying and reduce typos; finding a city name from the airport code would be a simple table lookup
2. flight number is a really lousy choice for a key -- for two reasons: (a) how many carriers have a flight 1234 and how few of them have this flight going from one specific location to another, and (b) flights are not unique -- if you buy a ticket from Delhi to Pune on flight 1234, that's probably going to be associated with a date (say 6/15) -- and you most likely cannot use that ticket on 6/13 without penalty
3. what about plane capacity -- if your plane holds 73 people and you sell 225 tickets from Mumbai to Delhi, there's going to be lots of unhappy customers, not to mention possible governmental action
4. your COMMAREA is limiting adults, infants, children to 9 or less; probably not the best idea if families decide to travel together and they have lots of kids
5. is this an airline with only one class of seat? If not, you need to be able to distinguish between coach, business, first class seats and tickets
6. you list stops on your last post -- do you want to just have the count, or the specific names? In either case, your flight file better have a way to link the different segments together because two people might want to start at the same stop but go to different locations -- data design for sure!
I'm sure you will consider other things as you design -- frequent flyers, pricing different segments of a flight that has 3 stops, assigned seats versus open seating, window versus aisle seats, data validation (return dates before departure dates for one), and so forth.