February 11th, 2010, 02:06 AM
Can anyone guide me to learn cobol.
February 11th, 2010, 04:44 AM
Yes I can guide you.
Firstly, you wont learn without initiative and encouragement.
Therefore I encourage you to find some initiative, do some research yourself, and come back and ask real questions (which will get real answers).
February 11th, 2010, 04:48 AM
Originally Posted by l8rm8e
I am using Cobol 2.00 version for writing program. Presently, I am facing a strange problem. For preparing report, I have to select the records from the main data base basing on various parameters. There are 50 parameters and for each parameter, I have created 2 / 3 variables in the Working-storage section. After coding for each parameter (separate para for each), I am running the programme to find out whether it is working properly or not.
Upto 27 parameters, the program worked properly. For the 28th parameter, when it has to display a fixed statement at a particular line & column, either display statement pertaining to other previous parameter or some other ASCII characters are being displayed, which have no meaning.
I faced the above problem while coding for the parameter no. 24 (upto parameter no. 23, the program was working properly). Presuming that my program size is probably exceeding the memory size (data area and code area) fixed by the compiler, I trimmed the entire programme, mostly the display statements pertaining to each parameters in its respective paragraphs (for each parameter, I have to show separate statement on the screen through Display). After doing so, I was able to add 3 more parameters. However, since I have to add another 27 more parameters (50 – 23), I had a doubt that the above problem would come very soon, which has happened now.
What is the way out from this problem ?
What is the optimum size of the program in Cobol 2.00 ( .int file), which will run smoothly ?
The present size (upto 27th parameter) of the program in Bytes is as under :-
Data area size = 6792
Code Area size = 16014
Size of .int program = 23,318
Source code (.cob) size = 49,666
I shall be glad to receive the solution.
P K Dash
February 11th, 2010, 07:01 AM
You've caught me out here as my COBOL skills aren't that current. I haven't coded in COBOL 2 at all, and haven't touched any COBOL code since 1999. My impression from your first post was you were a total newbie wishing to learn COBOL from scratch. Your more detailed response indicates otherwise.
I believe you can do 100 nested levels of PERFORM, but it doesn't sound like you're nesting anyway (with separate paragraphs per parameter).
Do you need 50 parameters for EVERY record, or does the report use 50 parameters in total?
If you can, try making smaller programs customized to dig out each record type, and chain them together to produce the final report.
In my historic experience with COBOL, the hardware it ran on was extremely limited and advanced reporting often took a number of stages to complete, relying heavily upon the file system as a working space and using a combination of COBOL and shell scripting.
Sorry I'm not much help.
Maybe these will help:
February 11th, 2010, 07:38 AM
has anyone noticed that this is a C and C derivative programming forum?
February 11th, 2010, 08:46 AM
Cobol begins with a C!
February 11th, 2010, 09:04 AM
Guess that why he created a this post
Originally Posted by nattylife
February 11th, 2010, 12:09 PM
Thread moved to Other Programming Languages.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo