Become a part of the TranceAddict community!Frequently Asked Questions - Please read this if you haven'tSearch the forums
TranceAddict Forums > Other > Technology & Gadget Zone > Fujitsu COBOL hates me
  Last Thread   Next Thread
Share
Author
Thread    Post A Reply
Dojomaster26
Daft Milk



Registered: Feb 2004
Location: Hickory
Angry Fujitsu COBOL hates me

I'm having some serious problems with getting my COBOL programs to work under the Fujitsu compiler. I've tried everything I can and I've spent hours reading through comp.lang.cobol but I haven't been able to get it to work right.

All of my programs can compile with no errors, and they can be linked with no problems, but when I go to run the programs I get nothing. No confirmation, no output, nothing. The programs are supposed to output data to a file, but the file remains empty. Any suggestions on what to do?

I am using Fujitsu v3 on WinXP in compatibility mode for WinNT: SP4. The source code for one of the programs is below:
quote:

Identification Division.
Program-ID. Savings.
Author. Dojomaster.

Environment Division.
Input-Output section.
File-Control.
Select Savings-File Assign to 'PRJ03-04.dat'
Organization is line sequential.
Select Print-File Assign to 'print.txt'
Organization is line sequential.

Data Division.

File Section.
FD Savings-File
Record contains 39 characters
Data record is Save-In.
01 Save-In.
05 Act-Num Pic 9(8).
05 Name Pic X(17).
05 Amount Pic 9(7).
05 Term Pic 9(2).

FD Print-File
Record contains 132 characters
Data record is Print-Line.
01 Print-Line Pic X(132).

Working-Storage Section.
01 Data-Remains-Switch Pic X(2) Value Spaces.

01 Variables
05 Interest Pic V99.
05 Dividend Pic 9(5)V99.
05 New-Amount Pic 9(8).
05 Tot-Amount Pic 9(8).
05 Tot-Dividend Pic 9(8).
05 Tot-Savings Pic 9(9).

01 Heading-Line-One
05 Filler Pic X(3) Value Spaces.
05 Filler Pic X(7) Value 'Account'.
05 Filler Pic X(27) Value Spaces.
05 Filler Pic X(7) Value 'Savings'.
05 Filler Pic X(3) Value Spaces.
05 Filler Pic X(8) Value 'Dividend'.
05 Filler Pic X(6) Value Spaces.
05 Filler Pic X(5) Value 'Total'.

01 Heading-Line-Two
05 Filler Pic X(3) Value Spaces.
05 Filler Pic X(6) Value 'Number'.
05 Filler Pic X(6) Value 'Name'.
05 Filler Pic X(19) Value Spaces.
05 Filler Pic X(6) Value 'Amount'.
05 Filler Pic X(6) Value Spaces.
05 Filler Pic X(4) Value 'Paid'.
05 Filler Pic X(6) Value Spaces.
05 Filler Pic X(7) Value 'Savings'.

01 Detail-Line.
05 Filler Pic X(3) Value Spaces.
05 Print-Act-Num Pic 9(8).
05 Filler Pic X(4) Value Spaces.
05 Print-Name Pic X(16).
05 Filler Pic X(6) Value Spaces.
05 Print-Amount Pic 9(7).
05 Filler Pic X(4) Value Spaces.
05 Print-Dividend Pic 9(7).
05 Filler Pic X(4) Value Spaces.
05 Print-New-Amount Pic X(8).

01 Total-Line-One
05 Filler Pic X(25) Value Spaces.
05 Filler Pic X(9) Value '---------'.
05 Filler Pic X(2) Value Spaces.
05 Filler Pic X(9) Value '---------'.
05 Filler Pic X(2) Value Spaces.
05 Filler Pic X(10) Value '----------'.

01 Total-Line-Two
05 Filler Pic X(19) Value Spaces.
05 Filler Pic X(6) Value 'Totals'
05 Filler Pic X(12) Value Spaces.
05 Print-Tot-Amount Pic 9(8).
05 Filler Pic X(3) Value Spaces.
05 Print-Tot-Dividend Pic 9(8).
05 Filler Pic X(3) Value Spaces.
05 Print-Tot-Savings Pic 9(9).

Procedure Division.
Prepare-Report.
Open Input Savings-File
Output Print-File
Perform Write-Headings.
Read Savings-File
At End Move 'No' to Data-Remains-Switch
End-Read.
Perform Process-Records
Until Data-Remains-Switch = 'No'.
Perform Write-Totals.
Close Savings-File
Print-File.
Stop Run.

Write-Headings.

Move Heading-Line-One to Print-Line.
Write Print-Line.
Move Heading-Line-Two to Print-Line.
Write Print-Line.

Write-Totals.

Move Total-Line-One to Print-Line
Write Print-Line.
Move Tot-Amount to Print-Tot-Amount.
Move Tot-Dividend to Print-Tot-Dividend.
Move Tot-Savings to Print-Tot-Savings.
Move Total-Line-Two to Print-Line
Write Print-Line.

Process-Records.

If Term < 7
Compute Interest = .06
Else If Term < 13
Compute Interest = .07
Else If Term < 19
Compute Interest = .08
Else If Term < 25
Compute Interest = .09
Else If Term < 31
Compute Interest = .1
Else
Compute Interest = .12
End-If.

Multiply Amount by Interest giving Dividend.
Add Dividend to Amount giving New-Amount.

Add Amount to Tot-Amount giving Tot-Amount.
Add Dividend to Tot-Dividend giving Tot-Dividend.
Add New-Amount to Tot-Savings giving Tot-Savings.

Move Act-Num to Print-Act-Num.
Move Name to Print-Name.
Move Amount to Print-Amount.
Move Dividend to Print-Dividend.
Move New-Amount to Print-New-Amount.
Move Detail-Line to Print-Line.

Write Print-Line.
Read Savings-File
At End Move 'No' to Data-Remains-Switch
End-Read.


___________________
Overload (House/J-Pop/K-Pop): Click
No Pants Dance (Funky House/Electro House/K-Pop): Click
Dark Beach (Deep House): Click

Old Post May-04-2007 03:23  United States
Click Here to See the Profile for Dojomaster26 Click here to Send Dojomaster26 a Private Message Visit Dojomaster26's homepage! Add Dojomaster26 to your buddy list Report this Post Reply w/Quote Edit/Delete Message

TranceAddict Forums > Other > Technology & Gadget Zone > Fujitsu COBOL hates me
Post New Thread    Post A Reply

 
Last Thread   Next Thread
Click here to listen to the sample!Pause playbackVonyc 156 Track ID Request [2009] [0]

Click here to listen to the sample!Pause playbackAbsolom - "Secret" (DJ Quicksilver Remix) [2004]

Show Printable Version | Subscribe to this Thread
Forum Jump:

All times are GMT. The time now is 22:49.

Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
HTML code is ON
vB code is ON
[IMG] code is ON
 
Search this Thread:

 
Contact Us - return to tranceaddict

Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
Support TA!