Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execution error

Status
Not open for further replies.

beckyh

Programmer
Apr 27, 2001
126
US
I have not programmed in COBOL for about two years now. I am trying to run a program and I am receiving the following prompt or error (this shows how much I know...)

ST 66 GAGETRAK C?

Does anyone know what this syntax means, and how to fix it?? Thank you in advance. All ideas are welcome :)
 
What environment are you operating in? Also, have you eliminated the possibility that the message is application-specific (generated by program logic, as opposed to the compiler or operating system)? Jay
 
I am operating in MS/DOS mode, with applications that I downloaded from the internet for free. How would I know if the program is generating the prompt? I don't see anything like that. Thanks for replying.
 
If there isn't any functional documentation, the message text would be in the source code. It might be built from variable elements, complicating its detection. If you don't have the source or any documentation, you might be able to determine this by searching the executable code, although this would only work if the message or its elements are made up of program literals. If you're able to determine that the message is application-specific, you'll still need either documentation or source code to identify its cause and implement corrective action.

Did you download the apps as executables or as source code which you compiled in your environment? Jay
 
I dowloaded the files as exe's. I do have the source code in front of me and do not see anything that resembles the propmt I am getting. Is there something specific I should look for. I know the program is running and getting stuck because the output file is started and is showing the correct data, after being run throught the program.

Thanks. Any more ideas?
 
Assuming you have it in electronic form, I'd search for the string "GAGETRAK" or just "GAGE" or "TRAK".
Also, are you certain that all of the programs/sub-programs are COBOL? That single character "C" at end makes me suspiciouis. Jay
 
I am sure the program is only written in COBOL. I didn' understand the C either. I will try searching and see what I come up with. This is so frustrating because the person who wrote this is no longer working here.

If I hit Ctrl+Z, it will move to the next line 67, hit enter it goes to the next line and so on. This also has me confused. Any ideas?
 
Hi,
It appears you are executing the program in debug mode, so it is stopping at address 66 and waiting to see if you want to step thru it, display data, etc. Your execute statement may have a parameter set on to indicate this mode of execution.
 
This is a good thought. I am looking at the source code and noticed it is written with GO TO statements. Yuck! Is there any way I can run this program, not in debug mode. I only need it to run through once, all the records though. This will not be run all the time, it's just a fix program.

Any more help is greatly appreciated. We are finally getting somewhere with this program. Thank you.
 
This is the actual code:(minus the header section)

ENVIRONMENT DIVISION.
000060 INPUT-OUTPUT SECTION.
000070 FILE-CONTROL.
000080 SELECT gagefile ASSIGN TO disc
000090 ORGANIZATION IS LINE SEQUENTIAL.
000100 SELECT gageout ASSIGN TO disc
000110 ORGANIZATION IS LINE SEQUENTIAL.
SELECT GAGE-INDEX ASSIGN TO DISC
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS GAGE-KEY.
000120
000130 DATA DIVISION.
000140 FILE SECTION.
000150 FD gagefile
000160 RECORD CONTAINS 67 CHARACTERS
000170 DATA RECORD IS GAGE-IN.
000180 01 gage-IN.
03 description-in pic x(15).
03 read-key-IN pic x(8).
03 read-key-hyphen-IN pic x.
03 read-key-rest-IN pic x(7).
03 read1-IN pic x(10).
03 read2-IN pic x(10).
03 read3-IN pic x(10).
03 readinch-IN pic x(5).
03 readv-IN pic x.
FD GAGEOUT
RECORD CONTAINS 63 CHARACTERS
DATA RECORD IS GAGE-OUT.
01 GAGE-OUT.
03 description-OUT pic x(15).
03 read-key-OUT pic x(8).
03 read-key-hyphen-OUT pic x.
03 read-key-NUMBER pic 9(3).
03 read1-OUT pic x(10).
03 read2-OUT pic x(10).
03 read3-OUT pic x(10).
03 readINch-OUT pic x(5).
03 readv-OUT pic x.
FD GAGE-INDEX
RECORD CONTAINS 18 CHARACTERS
DATA RECORD IS GAGE-REC.
01 GAGE-REC.
03 GAGE-KEY.
05 DEFINITION-GAGE PIC X(15).
05 GAGE-NUMBER PIC 9(3).

000200
000240
000250 WORKING-STORAGE SECTION.
000260 01 WORK-DESC PIC X(15).
000319 01 COUNTER-REC PIC 9(9) VALUE 0.
000320 PROCEDURE DIVISION.
000321
000330 PREPARE-SENIOR-REPORT.
000340 OPEN INPUT GAGEFILE
000350 OUTPUT GAGEOUT gage-index.
000390 READ-NEXT-REC.
000440 READ GAGEFILE
AT END GO TO CLOSE-IT.
PERFORM PROCESS-RECORDS THRU WRITE-OUT-REC-END.
GO TO READ-NEXT-REC.
000450
000460 PROCESS-RECORDS.
000470 MOVE DESCRIPTION-IN TO DESCRIPTION-OUT.
000480 MOVE READ-KEY-IN TO READ-KEY-OUT.
MOVE "-" TO READ-KEY-HYPHEN-out.
MOVE 1 TO COUNTER-REC.
PERFORM CHECK-FOR-DUPS THRU CHECK-FOR-DUPS-EXIT.
MOVE COUNTER-REC TO READ-KEY-NUMBER.
MOVE READ1-IN TO READ1-OUT.
MOVE READ2-IN TO READ2-OUT.
MOVE READ3-IN TO READ3-OUT.
MOVE READINCH-IN TO READINCH-OUT.
MOVE READV-IN TO READV-OUT.
000490 WRITE GAGE-OUT.
000500 WRITE-OUT-REC-END.
EXIT.
000540 CHECK-FOR-DUPS.
MOVE DESCRIPTION-IN TO definition-GAGE.
MOVE COUNTER-REC TO GAGE-NUMBER.
WRITE GAGE-REC
INVALID KEY
ADD 1 TO COUNTER-REC
GO TO CHECK-FOR-DUPS.
CHECK-FOR-DUPS-EXIT.
EXIT.
000550
000572 CLOSE-IT.
CLOSE GAGEFILE.
CLOSE GAGEOUT.
CLOSE GAGE-INDEX.
STOP RUN.


Any suggestions? See any problems or why it's stopping me? I need it to run thru all 26,000 records. Please help.
 
Well I tried your display data idea. I got the following message.....

"Program not compiled with Y option"

Any thoughts?
 
This looks like an RM/COBOL application that is run in debug mode. Check your command line for a D option. Your command line probably looks something like:

runcobol.exe gagetrak.cob K D

If your command line does not contain a D option it is possible you are using an educational version. A educational version will always start in debug mode. You can determine the version of RM/COBOL by typing runcobol.exe without the K option. This will display the banner.

To resume execution in debug mode type an R at the prompt.

I am curious where you downloaded an RM/COBOL runtime?
 
You are correct, I displayed the bannner and got......

RM/COBOL-85 Runtime (Version 4.10.05) for DOS 2.00+. Configured for 001 user.
Educational Version - Restricted Usage
........by Ryan McFarland Corp..............

Are you saying that this version will not run my program? I am unclear how to get out of debug mode or how to make it run without prompts?

You guys are really good. All this help is wonderful. I am learning so much. I am still unclear what these letter mean? K D R?? Please continue with this great help.
 
Your programs must have been compiled with an Educational Version compiler or they would not load at all with an Educational Version runtime.

The educational version of the runtime will always start in debug mode. It also has several limitations built into the runtime to prevent it from being used in a useful commercial application.

You can run your programs but they will always start in debug mode. The K command line option will suppress the banner when the runtime starts. The D command line option is not valid with the educational version since it will always start in debug.

The debug command R will resume execution. For more information go to The documentation is for a much more current non-educational version but it does describe command line options and debug options.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top