Sams Teach Yourself COBOL in 24 Hours technical FAQ:
These are frequently asked questions received by the author. I do not mind answering these, but I think that a single source for the answers will help individuals who feel uneasy emailing the author, or who have problems emailing because my address was changed.
E-mail the author: cobol24@softwaresimple.comTypos in the book.
If you have the second printing, there are few typos, and non critical. If you have the first printing, there are two real issues. To determine which printing you have, go to the Copyright page of the book and look 2 lines up from the "First Printing December 1998" line. If the numbers count down to 1, you have the first printing.
First, some of the early CD’s have a version of the 60 Day Evaluation version of Flexus COBOL sp2 GUI development tool, that will indicate that it is expired the first time you run it. An update, if you have this problem, can be obtained from:
SPFJ3224.EXEThis site has an ftp download link to the Flexus FTP server.
Secondly, in the first printing are several unfortunate typos – these are listed at the bottom of this document. If you have the first printing, and are having trouble compiling examples (especially those in Hour 4) please refer to this list as it will clear things up.
Some eager readers attempt to install the CD FIRST, before opening the book, and encounter the need to enter a serial number for the installation to proceed. This serial number is located on page 14 of the book. This is probably the most frequently asked question!
Non US readers may encounter the following error message when trying to compile the examples in Hours 3 and 4 relating to the use of $ by COBOL to indicate currency:
JMN1142I-S INVALID CHARACTER IS SPECIFIED IN PICTURE CHARACTER-STRING.
PICTURE 9 ASSUMED.
The simplest solution to this problem is to go into the Windows regional settings from control panel, and set the currency symbol to $. Another solution is to change the compiler directives from:
@OPTIONS MAIN to
@OPTIONS MAIN,CURRENCY($)
In a few cases, after installing the Fujitsu compiler, and trying to validate the install, readers encounter problems. The sample compiles, but when it is executed, the following error message appears:
"A Required DLL file, F3BIPRCT.DLL, was not found."
This is caused by failure of the Fujitsu install program to properly modify the PATH= statement in the C:\AUTOEXEC.BAT file of the computer, or by Windows 98 disabling execution of AUTOEXEC.BAT.
If you are running Windows 98 ensure that you have not disabled processing of the AUTOEXEC.BAT. You can check by clicking Start, then Run then typing MSCONFIG and enter. Under the General tab ensure that either Normal Startup is selected, or Selective Startup is selected with processing of CONFIG.SYS and AUTOEXEC.BAT enabled.
The simplest way to cure this problem once you are sure AUTOEXEC.BAT is being executed, is to manually edit the AUTOEXEC.BAT and correct the PATH= statement to include, C:\FSC\PCOBOL32.
However, in some cases the install actually corrupts the PATH= statement, concatenating several existing lines of the AUTOEXEC.BAT into one.
When the compiler installs, it creates backup copies of your AUTOEXEC.BAT. It starts with AUTOEXEC.001. If that is used, it uses AUTOEXEC.002, 003, etc. Find the most recent version of AUTOEXEC.* before the Fujitsu install and copy it to AUTOEXEC.BAT. Then manually modify the PATH= statement to include C:\FSC\PCOBOL32 and reboot.
In 90% of these cases this fixes the problem.
I have, however, seen some machines, particularly Packard Bell and NEC that use a proprietary boot sequence, and it makes it harder to get the path modified. If you think you have altered the path correctly and the program still encounters the error message, go to a DOS prompt and type PATH and press ENTER. If you do not see C:\FSC\PCOBOL32 in the path, then your changes had no effect.
For readers that cannot fix this problem, I will be happy to assist in making changes to the AUTOEXEC.BAT – simply send me an email with the AUTOEXEC.BAT attached as a binary attachment and I will return one that should work to get the reader’s compiler up and running.
Another error sometimes encountered when trying to link a program is:
NMAKE: Fatal error U1077: ‘C:\FSC\PCOBOL32\LINK’ : return code ‘0x68’ Stop
And a little further down:
LINK : Fatal error LNK1561: entry point must be defined
This is caused by failure to set the MAIN compiler directive. There are two ways to set this directive. The method recommended in the book is to use @OPTIONS MAIN on the first line of the program, where the @ begins in column 8.
The second method is described in Hour 2 on pages 17-18. You can also view the Lotus™ Screencam movie in the \CAMS folder of the book’s CD named VALIDATE.EXE to see how to set these options.
Some readers report problems validating the compile because the default folder is not the same as listed in the instructions. To correct this problem, click the down arrow next to the LOOK IN and choose your C: Drive, then \FSC, then \PCOBOL32 and then follow the remaining instructions.
In addition to the typos in the first printing, the following minor technical errors exist in later printings.
On page 58, code line 37 should say "Group-Level-Item" instead of "Group Level-Item".
On page 128 there is a code snippet comparing two numeric literals. This will not compile with most compilers, as one of the items in an IF statement cannot be a literal. The code is for the simple illustration of the concept of True and False conditions.
Additionally, on page 130, sample lines 44-46, the statement shows:
If Data-A Not > Data-B
Display "A < B"
End-If
Is not correct, A could be = to B, so the Display should be: Display "A <= B".
What follows are the typos found in the first printing, but corrected in subsequent printings.
*Page 27, Third paragraph, first line:
The Working Storage Section
Should be:
The Working-Storage Section
A dash is missing.
*Page 32 -
The book says to insert a line that says "@OPTIONS MAIN" - the sentence ends in a period.
Readers are putting the period in the program and it's failing to compile. A sentence should be inserted that warns:
Do not terminate the line with a period.
It should appear after ....MAIN is all in upper case.
*Page 40 -
In the table 3.1 next to the 66 level it says:
The Renames clause is rarely used and is not be covered in any
detail...
It should not have the "be" in there, it should just say:
... is not covered in any detail...
*Page 44 -
The two examples are just wrong. Erroneous characters are on the
lines.
This is how it should look:
000030 01 Monthly-Net-Profit Pic s9(5)v9(2) Sign is Leading
000031 Separate Character.
000032 01 Quarterly-Net-Profit Pic s9(5)v9(2) Sign Trailing Separate.
The second example:
000033 01 Yearly-Net-Profit Pic s9(5)v9(2) Value Zeros.
000034 01 Yearly-Gross-Profit Pic s9(5)v9(2) Value Zeros Sign Leading
000035 Separate.
*Page 53 - Line 14 of the source code listing -
It says Chapt2a-Start. It should say Chapt03a-Start.
(The source code on the CD is correct)
*Page 56 - SERIOUS ERROR - Lines 10 and 37 of the source code.
Should be Group-Level-Item. not Group Level-Item
Page 68 - SERIOUS ERROR - Line 13 of the listing.
Main-Screen is followed by a period that should not be there.
Remove the period so that the line reads:
000013 01 Main-Screen
As it is it will not compile.
*Page 82 - Technical error.
In the second paragraph under the "Paragraphs" header, The third
sentence starts with "Programming statements in COBOL" -- should read "Groups
of programming statements in COBOL".
In the next paragraph, first sentence: "COBOL sentences tell"..
should be "COBOL statements tell"...
Same paragraph, third sentence "Each sentence may..." should be
"Each statement may...".
*Page 74 - in the New Term area, last line says:
"... scope terminators are pointed in relevent discussions."
Should say
"... scope terminators are pointed out in relevant discussions."
*Page 85 - SERIOUS ERROR - The second code example, line 94.
The first Data-Item-2 should be Data-Item-1
ie:
000094 Add 1, 2, 3, 4, Data-Item-1, Data-Item-2 Giving Data-Item-3
*Page 92 - last paragraph above the code example at the bottom.
Middle line says "Move uses of the Corresponding" - delete the
word "of".
*Page 101 - Code example got mangled. Make it look like this:
000106 Inspect Data-Item Tallying Work-Counter For Characters Before
000107 Initial ",".
*Page 211 in the table 13.1 left column where it says:
This is a Line Sequential recordCRLF - it should say
This is a Sequential recordCRLF - all on a single line and
Sequential should not be a special font, and Line should not be there at all. The CRLF
needs to be italicized.
*Page 225 - In the new term, 5th line down,
Says Chapt13aa should be Chapt13a
*Page 259 - First paragraph last line.
Text says "Status values that may be returned as the Read Next
statement."
The "as" should be "after" - ... returned after the Read Next....
*Page 267 -SERIOUS ERROR - in the first A of the Q&A - last line.
Says: Key Not > Your-Key - should be Key Not < Your-Key
*Page 376 - SERIOUS ERROR - References chapter 22 - and what
is referenced is actually covered in this chapter!
The sentence says "Hour 22 describes an even easier method that
uses another COBOL provided intrinsic function."
Change the sentence to read: "An even easier method that uses
another COBOL provided Intrinsic Function is demonstrated later in this hour.".
*Page 383 - near the bottom, mentions a book by Donald Kunth -
should be Donald Knuth.
*Page 391 - near the top, code sample line 000102 - should have
.875 instead of .785 inside the parenthesis in order to match the
text just above it!
*Page 450 - First paragraph, third line from botton, says...
"... an Indexed or Random file...."
It should be Relative instead of Random and it should be Icap mono.
"... an Indexed or Relative file..."