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: 778
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: 2354
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 How to remove remote file older than ... ssuthagar All Other Mainframe Topics 4 Thu Jun 04, 2020 6:26 am
No new posts How to fetch the latest record from a... Dinesh Mani DFSORT/ICETOOL 8 Tue Jun 02, 2020 5:34 pm
No new posts Question for Cobol Report Writer jackzhang75 COBOL Programming 2 Wed May 27, 2020 4:35 am
No new posts Compare multiple files using JCL/Rexx... tanvi110788 JCL & VSAM 4 Tue May 19, 2020 5:47 pm
No new posts Need help to concatenate files with w... ssuthagar All Other Mainframe Topics 3 Fri May 15, 2020 1:39 am

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