Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Program templates as Object Classes (was: Non-Cobol person getting er)
..    On  23.11.04
wrote  jjgavan@shaw.ca (James J. Gavan)
on  /COMP/LANG/COBOL
in  XVxod.310652$nl.309168@pd7tw3no
about  Re: Non-Cobol person getting error code


JJG> You are no doubt well versed in other OO languages,

unfortunately not

JJG> and I think I'm correct in saying that COBOL is the only language
JJG> with an in-built file system (????).

mh. Maybe the only one, or most used one, which has syntax for
these three different file organizations, sequential, relative, and
indexed.

JJG> I struck lucky; although cobolreport.com no longer appears to be
JJG> accessible,

It was just the portal to the site objectz.com, as you found out.
So instead of calling www.cobolreport.com, go straight to
www.objectz.com

JJG> using a google search on 'Gene Webb' I got the following
JJG> link, (which is a part of cobolreport.com) :-
JJG> .
JJG> http://objectz.com/oocobol/tutorial/

Thanks for the link, I will have a look at it.


I was thinking more about that class which you presented the other
day, and which was capable of getting the NEXT record in some file
with sequential access. Although I think it is not wise to replicate
what the COBOL compiler does at any rate, it prompted my imagination
to find a better concept based on OO-programming.

You might remember that I presented this simple model for
processing a sequential file, or indexed file in sequential access,
with a READ-FIRST and a loop over "process-available-record, and try-
to-get-next"  and that I was thinking about writing a script to
generate a program skeleton of a COBOL program (I would have done it
in REXX).

Like this:


--------- schnipp -----------------------------------------
OPEN INPUT input-file
IF is-not-present-file in status-input-file
THEN                                  *> minor filestat = '5'
DISPLAY "input-file is not present"
ELSE
READ input-file
IF has-reached-EOF in status-input-file
THEN                                *> Major filestat = '1'
DISPLAY "input-file is empty"
ELSE
OPEN OUTPUT output-file
INITIATE output-report
PERFORM WITH TEST AFTER
UNTIL has-reached-EOF in status-input-file
*> do something useful with the input record
PERFORM process-available-record
*>  whose presence is asserted here
GENERATE report-detail-item
READ input-file
END-PERFORM
TERMINATE output-report
CLOSE output-file
END-IF
CLOSE input-file
END-IF
STOP RUN

Report this thread to moderator Post Follow-up to this message
Old Post
Lueko Willms
11-25-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:24 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.