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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

whats all this fluff after compilation

Status
Not open for further replies.

cobolsucksbadly

Programmer
Apr 6, 2003
1
CA
this is my 2nd day using Fujitsu. All I want to do is read, process and output a file. I've figured out where to place everything but I get this extra fluff that I DON'T WANT! How can I get rid of it?

**** WORKING STORAGE IS ABOVE *********
000246 LINKAGE SECTION.
000247 01 POW-FORM IS GLOBAL.
000248 02 POW-SELF PIC S9(9) COMP-5.
000249 02 POW-SUPER PIC X(4).
000250 02 POW-THIS PIC S9(9) COMP-5.
000251 01 SALASSIGN REDEFINES POW-FORM GLOBAL PIC S9(9) COMP-5.
000252 01 POW-CONTROL-ID PIC S9(9) COMP-5.
000253 01 POW-EVENT-ID PIC S9(9) COMP-5.
000254 01 POW-OLE-PARAM PIC X(4).
000255 01 POW-OLE-RETURN PIC X(4).
000257 PROCEDURE DIVISION USING POW-FORM POW-CONTROL-ID POW-EVENT-ID POW-OLE-PARAM POW-OLE-RETURN.
000258 EXIT PROGRAM.
******* THE FLUFF IS ABOVE ****
000259
000261 000-SAL-MAINLINE.
000262 PERFORM 100-SAL-INIT.
000263 PERFORM 200-SAL-FIRST-READ-VALIDATE
000264 UNTIL WS-RECORD-OK-FIRST = 'YES'.
000265 PERFORM 300-SAL-PROCESS-RECORD
000266 UNTIL WS-EOF-SWITCH = 'YES'.
000267 PERFORM 900-SAL-WRAPUP.
000268 STOP RUN.
 
I don't see any replies to this question.

It looks to me as if you are using PowerCOBOL - when you really ONLY "need" to use the basic COBOL compiler. There is "nothing wrong" with using PowerCOBOL for what you are doing, but there is also no need to do so. Once you decide to use PowerCOBOL rather than the "basic" compiler, you automatically get all that "fluff".
 
I agree with the previous response. PowerCobol needs all that fluff in order to operate the windows forms. If you use program manager and write your program outside of powerCobol, you can get rid of the fluff however, if you want the look and feel of windows, you will have to learn to live with it.
 
Below you will see a simple cobol progran in basic cobol that opens a fixed format .txt file and prints it on the printer. The total program is about a page. That isn't much fluff for a formated listing. the print configuration works on HP printers.

000010****************************************************************************
000020* BEGINNING OF THE IDENTIFICATION DIVISION *
000030****************************************************************************
000040 IDENTIFICATION DIVISION.
000050 PROGRAM-ID. LISTOUT.
000060*
000070****************************************************************************
000080* BEGINNING OF THE ENVIRONMENT DIVISION *
000090****************************************************************************
000100 ENVIRONMENT DIVISION.
000110****************************************************************************
000111 CONFIGURATION SECTION.
000112 SPECIAL-NAMES.
000113 PRINTING MODE CHAR-TYPE IS
000114 FOR ALL
000115 IN SIZE 6 POINT
000116 AT PITCH 13
000117 WITH FONT GOTHIC
000118 AT ANGLE 0 DEGREES
000119 BY FORM F0202.
000120* BEGINNING OF FILE CONTROL *
000130 INPUT-OUTPUT SECTION.
000140 FILE-CONTROL.
000150 SELECT INVENTORY-FILE-IN
000160 ASSIGN TO "A:\INV_DATA.TXT"
000170 ORGANIZATION IS LINE SEQUENTIAL.
000180 SELECT INVENTORY-LISTING-OUT
000190 ASSIGN TO PRINTER
000200 ORGANIZATION IS SEQUENTIAL.
000210*
000220****************************************************************************
000230* BEGINNING OF THE DATA DIVISION *
000240 DATA DIVISION.
000250 FILE SECTION.
000260 FD INVENTORY-FILE-IN.
000270 01 INVENTORY-RECORD-IN.
000280 02 PART-NO PIC X(6).
000290 02 PART-DESC PIC X(19).
000300 02 ON-HAND PIC 9(4).
000310 02 ON-ORDER PIC 9999.
000320 02 OREDR-QUANTY PIC 9(4).
000330 02 UNIT-COST PIC 99.99.
000340 02 UNIT-SELL PIC 9(2).9(2).
000350 02 FILLER PIC X(20).
000360 FD INVENTORY-LISTING-OUT.
000370 01 PRINT-LINE-OUT.
000380 02 PART-NO PIC X(6).
000390 02 PART-DESC PIC X(19).
000400 02 ON-HAND PIC 9(4).
000410 02 ON-ORDER PIC 9999.
000420 02 OREDR-QUANTY PIC 9(4).
000430 02 UNIT-COST PIC 99.99.
000440 02 UNIT-SELL PIC 9(2).9(2).
000450 02 FILLER PIC X(20).
000460****************************************************************************
000470* BEGINNING OF THE WORKING STORAGE SECTION *
000480 WORKING-STORAGE SECTION.
000810 01 WORK-AREA PIC S9999V999 COMPUTATIONAL.
000820 01 ONEHALF PIC 99 VALUE 50.
000830 01 PAGECOUNT PIC 99 VALUE 1 COMPUTATIONAL.
000840 01 LINE-COUNT PIC 99 VALUE 0 COMPUTATIONAL.
000850 01 EOF-SWITCH PIC X VALUE "N".
000860*
000870****************************************************************************
000880* BEGINNING OF THE PROCEDURE DIVISION *
000890****************************************************************************
000900 PROCEDURE DIVISION.
000910 OPEN INPUT INVENTORY-FILE-IN.
000920 OPEN OUTPUT INVENTORY-PRINT-OUT.
000930*
000940 LOOP-POINT.
000950 READ INVENTORY-RECORD-IN AT END GO TO NO-MORE-DATA.
000960 MOVE CORR INVENTORY-RECORD-IN TO PRINT-LINE-OUT.
000970 WRITE PRINT-LINE-OUT.
000980 GO TO LOOP-POINT.
000990*
001000 NO-MORE-DATA.
001010 CLOSE INVENTORY-FILE-IN.
001020 CLOSE PRINT-FILE-OUT.
001030 END PROGRAM LISTOUT.
 
In my haste last night I responded with a copy of the file I give students to debug not the correct one. Sorry.

Below is a corrected copy. The data is an 80 character text file matching the input record format.

000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. SOLUTION.
000030 ENVIRONMENT DIVISION.
000040 CONFIGURATION SECTION.
000050 SPECIAL-NAMES.
000060 PRINTING MODE CHAR-TYPE IS
000070 FOR ALL
000080 IN SIZE 6 POINT
000090 AT PITCH 13
000100 WITH FONT GOTHIC
000110 AT ANGLE 0 DEGREES
000120 BY FORM F0202.
000130 INPUT-OUTPUT SECTION.
000140 FILE-CONTROL.
000150 SELECT INVENTORY-FILE-IN
000160 ASSIGN TO "C:\COBOL\INV_RPT.TXT"
000170 ORGANIZATION IS LINE SEQUENTIAL.
000180 SELECT INVENTORY-PRINT-OUT
000190 ASSIGN TO PRINTER
000200 ORGANIZATION IS SEQUENTIAL.
000210 DATA DIVISION.
000220 FILE SECTION.
000230 FD INVENTORY-FILE-IN.
000240 01 INVENTORY-RECORD-IN.
000250 02 PART-NO PIC X(6).
000260 02 PART-DESC PIC X(19).
000270 02 ON-HAND PIC 9(4).
000280 02 ON-ORDER PIC 9999.
000290 02 OREDR-QUANTY PIC 9(4).
000300 02 UNIT-COST PIC 99.99.
000310 02 UNIT-SELL PIC 9(2).9(2).
000320 02 FILLER PIC X(34).
000330 FD INVENTORY-PRINT-OUT.
000340 01 PRINT-LINE-OUT CHARACTER TYPE CHAR-TYPE.
000350 02 PART-NO PIC X(6).
000360 02 FILLER PIC X.
000361 02 PART-DESC PIC X(19).
000370 02 FILLER PIC X.
000371 02 ON-HAND PIC Z(4).
000380 02 FILLER PIC X.
000381 02 ON-ORDER PIC ZZZZ.
000390 02 FILLER PIC X.
000391 02 OREDR-QUANTY PIC Z(4).
000400 02 FILLER PIC X.
000401 02 UNIT-COST PIC ZZ.99.
000410 02 FILLER PIC X.
000411 02 UNIT-SELL PIC Z(2).9(2).
000420 02 FILLER PIC X(20).
000430 WORKING-STORAGE SECTION.
000440 01 WORK-AREA PIC S9999V999 COMPUTATIONAL.
000450 01 ONEHALF PIC 99 VALUE 50.
000460 01 PAGECOUNT PIC 99 VALUE 1 COMPUTATIONAL.
000470 01 LINE-COUNT PIC 99 VALUE 0 COMPUTATIONAL.
000480 01 EOF-SWITCH PIC X VALUE "N".
000490 PROCEDURE DIVISION.
000500 OPEN INPUT INVENTORY-FILE-IN.
000510 OPEN OUTPUT INVENTORY-PRINT-OUT.
000520 LOOP-POINT.
000530 READ INVENTORY-FILE-IN AT END GO TO NO-MORE-DATA.
000540 MOVE SPACES TO PRINT-LINE-OUT.
000541 MOVE CORR INVENTORY-RECORD-IN TO PRINT-LINE-OUT.
000550 WRITE PRINT-LINE-OUT.
000560 GO TO LOOP-POINT.
000570 NO-MORE-DATA.
000580 CLOSE INVENTORY-FILE-IN.
000590 CLOSE INVENTORY-PRINT-OUT.
000600 END PROGRAM SOLUTION.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top