Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
COBOL Student learning COBOL File Handling - Help Needed !!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
torrind

New User


Joined: 09 May 2020
Posts: 2
Location: UK

PostPosted: Sat May 09, 2020 3:40 am    Post subject: COBOL Student learning COBOL File Handling - Help Needed !!
Reply with quote

Hi All,

My first time here! icon_smile.gif

I'm a student seconded to a Large bank in the UK as part of my course and I'm learning COBOL in my spare time (GNU COBOL). As a project, I'm writing a simple airline booking program and have got quite far. The help I need is as follows:

If I have a 100 seater aeroplane setup as 4 rows of 25 seats, I want to be able to read the seat numbers in from a file and display where they are booked on this 4 x 25 grid as follows:

row1: xxxxxxxxx*xxxxx*xxxxxxx*x
row2: xxxxxxxxxxxxxxxxxxxxxxxxx
row3: xxxxxxxxxxxxxxxx**xxxxxxx
row4: xxxxxxxxxx*xxxxxxxxxxxxx*

In this example row 1 shows seats 10, 16 and 24 as booked
row 3 - seats 67 & 68 are booked
row 4 - seats 86 & 100 are booked (x's are empty seats)

Can anyone help with a simple way of doing this? I've been at this for weeks with no real success.

Thanks in advance,

Darren
Back to top
View user's profile Send private message

sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 810
Location: Maryland

PostPosted: Sat May 09, 2020 8:47 am    Post subject:
Reply with quote

http://www.ibmmainframeforum.com/
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2378
Location: Hampshire, UK

PostPosted: Sat May 09, 2020 2:12 pm    Post subject: Reply to: COBOL Student learning COBOL File Handling - Help Needed !!
Reply with quote

Funny sort of airplane! Do you mean 25 rows of 4 seats per row?


In any event, SergeyKen is correct - you are not an expert so really should be in the Beginners Forum.
Back to top
View user's profile Send private message
torrind

New User


Joined: 09 May 2020
Posts: 2
Location: UK

PostPosted: Sun May 10, 2020 12:14 am    Post subject: Reply to: COBOL Student learning COBOL File Handling - Help Needed !!
Reply with quote

Hi All,

Apologies for posting this in the wrong forum - I'm new to all this and didn't realise.

Thanks for the feedback guys.

Darren
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Restart logic by using cursor name in... Twinkle22 Mainframe Interview Questions 1 Wed Jul 29, 2020 11:26 am
No new posts Multiple Sums in one File Rick Ryan SYNCSORT 2 Wed Jul 29, 2020 1:30 am
No new posts Learning about Systems Assembler prog... WilliamDownie PL/I & Assembler 1 Mon Jul 20, 2020 3:27 pm
No new posts COBOL Developers Perspectives on Soft... achakarov COBOL Programming 4 Sat Jul 18, 2020 1:26 am
No new posts Extract part of data from file and wr... sathyajes DFSORT/ICETOOL 9 Thu Jul 16, 2020 10:49 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us