[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference clt::cobol

Title:VAX/DEC COBOL
Notice:Kit,doc,performance talk info-->DIR/KEY=KIT or DOC or PERF_TALK
Moderator:PACKED::BRAFFITT
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3250
Total number of notes:13077

3214.0. "reserved operand fault" by NETRIX::"[email protected]" (Fernando Bandeira) Wed Mar 12 1997 14:21

Hi!
This is a shot in the dark, I don't know what I'm talking about (parrot
fashion).

Dec Cobol v2.3-793, Digital Unix 3.2d.

Customer description:

After the record bellow is read in, it is released to the sort file causing
the following error:

Error message: SYSTEM-F-ROPERAND, reserved operand fault.
A numeric string or packed decimal value contains an invalid digit or sign.

Is there a way of checking the record for null values after it is read in,
or as it is read? The program currently aborts if the input data file contains
a null value. I'm not sure if it aborts because of the null value in the
numeric
field, or because the spaces following the nulls are read into the numeric
fields
because of the nulls. We would prefer that the program capture the error and
exit
normaly writing away the error to a log file, as it does with SQL and file
status.

This is part of the Customer's record: (\0=null)
# od -c record_name
0000000   ( all numbers, no nulls )
0000060   0  1  0  1  0  0  6  3  9  9  9  9 \0 \0 \0 \0
0000100  \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0    303
0000120                                                 
0000140                                       0  0  1  M
0000160   S  C  L  S                  0  0  0 0  9  6  1
  (and carries on).....
0000360   5  7  0  8  8  4  0  1  \n
end of record.

The program reads this record, placing the mentioned values into two numeric
fields, each 10 characters in length, PIC9(10).

Many thanx for ANY reply!
Cheers,
Fernando.
[Posted by WWW Notes gateway]
T.RTitleUserPersonal
Name
DateLines
3214.1Fernando will request the customer sourcePACKED::BRAFFITTWed Mar 12 1997 15:5845
               <<< CSC32::NOTES$LIB:[NOTES_CSCCS]COBOL2.NOTE;1 >>>
                            -< Micro Focus Cobol/2 >-
================================================================================
Note 562.2                   reserved operand fault                       2 of 3
PACKED::BRAFFITT                                     19 lines  12-MAR-1997 10:07
          -< After you get a source program, post this in CLT::COBOL >-
--------------------------------------------------------------------------------
>Dec Cobol v2.3-793, Digital Unix 3.2d.
>
>Customer description:
>After the record bellow is read in, it is released to the sort file causing
>the following error:
>
>Error message: SYSTEM-F-ROPERAND, reserved operand fault.
>A numeric string or packed decimal value contains an invalid digit or sign.

    This looks like a message from OpenVMS.  Are you sure the customer is
    using DIGITAL UNIX?
    
    Once you get a source program from the customer, you should post this
    in
    
    	CLT::COBOL
    
    which covers DEC/VAX COBOL.  COBOL2 (this conference) is devoted to MF
    COBOL.
    
               <<< CSC32::NOTES$LIB:[NOTES_CSCCS]COBOL2.NOTE;1 >>>
                            -< Micro Focus Cobol/2 >-
================================================================================
Note 562.3                   reserved operand fault                       3 of 3
NETRIX::"[email protected]" "Fernando"            12 lines  12-MAR-1997 12:35
                            -< gone to clt::cobol >-
--------------------------------------------------------------------------------
Hi!

Many thanx.
I'll request the source from the Cust. and update the NOTE:
http://www-notes.lkg.dec.com/clt/cobol/3214.0

Sorry for crashing in here.
Cheers,
Fernando.

[Posted by WWW Notes gateway]
3214.2source codeNETRIX::&quot;[email protected]&quot;FernandoMon Mar 17 1997 07:2810
Hi!

Just an update. As mentioned, I requested the source code
and the records to post here. It has been FIVE days and the
Customer hasn't replied :-( 

Cheers,
Fernando.

[Posted by WWW Notes gateway]
3214.3Source code here.NETRIX::&quot;[email protected]&quot;FernandoTue Mar 18 1997 08:17504
Hi!

Eventualy the Cust. sent me the source code and bits.
The following is from the email received:

The following files are as follows:

misc.cbl - the COBOL sort program that errors

misc.dat - the miscellaneous data file that has the invalid data,
           because of nulls in the first record, 
           following alphanumeric data is read into the numeric field

misc.out - the output file produced

misc.ld  - a comma delimited output file for the data warehouse.

misc.cbl - the COBOL sort program that errors NEXT:
       IDENTIFICATION                  DIVISION.
      *=========================================
       PROGRAM-ID.                     GFDYS580.
      ***************************************************************
      * This program sorts the miscellaneous transaction file from  *
      * the COLLECTOR process.  At end a message is written to the  *
      * log file.  Error messages are also written to the log file. *
      *                                                             *
      * Constructed by: Kim Poonsamy                                *
      * Updated by:     Martin Fortmann                             *
      * Date:           1996-10-20                                  *
      ***************************************************************
       ENVIRONMENT                     DIVISION.
      *=========================================
       INPUT-OUTPUT                    SECTION.
      *----------------------------------------
       FILE-CONTROL.
      *
           SELECT GMT-TRFILE
               ASSIGN                  TO 'MISC.DAT'
               ORGANIZATION            IS LINE SEQUENTIAL.
      *
           SELECT INM-TRFILE
               ASSIGN                  TO 'MISC.OUT'
               ORGANIZATION            IS LINE SEQUENTIAL.
      *
           SELECT INM-LDFILE
               ASSIGN                  TO 'MISC.LD'
               ORGANIZATION            IS LINE SEQUENTIAL.
      *
           SELECT SORT-FILE
               ASSIGN                  TO 'SORTFILE'.
      *
       DATA                            DIVISION.
      *=========================================
       FILE                            SECTION.
      *----------------------------------------
       FD  GMT-TRFILE.
      *
       01  GMT-TRN-REC.
           05  GMT-ACNO                PIC  9(10).
           05  GMT-CAPT-DATE           PIC  9(08).
           05  GMT-EFFECT-DATE         PIC  9(08).
           05  GMT-TRN-AMT             PIC  9(16)V99.
           05  GMT-GFIS-TRN            PIC  9(05).
           05  GMT-DBCR-IND            PIC  9.
           05  GMT-DOM-OUTLET          PIC  9(10).
           05  GMT-TRN-OUTLET          PIC  9(10).
           05  GMT-CONTR-OUTLET        PIC  9(10).
           05  GMT-PROD-TYPE           PIC  X(06).
           05  GMT-PROD-CLASS          PIC  X(06).
           05  GMT-PROD-TERM           PIC  X(06).
           05  GMT-PROD-RATE           PIC  X(10).
           05  GMT-SRC-OWNER           PIC  9(03).
           05  GMT-SRC-SYSTEM          PIC  X(10).
           05  GMT-TELLER-CARD         PIC  9(08).
           05  GMT-DEVICE-ID           PIC  9(02).
           05  GMT-PTC                 PIC  9(04).
           05  GMT-VAT                 PIC  9(16)V99.
           05  GMT-NARRATION           PIC  X(50).
           05  GMT-REF-NO              PIC  X(10).
           05  GMT-GL-ACC              PIC  X(15).
           05  GMT-RESOURCE            PIC  X(10).
           05  GMT-TIME                PIC  9(08).
           05  GMT-SEQ                 PIC  9(02).
      *
       FD  INM-TRFILE.
      *
       01  INM-TRN-REC.
           05  INM-ACNO                PIC  9(10).
           05  INM-CAPT-DATE           PIC  9(08).
           05  INM-EFFECT-DATE         PIC  9(08).
           05  INM-TRN-AMT             PIC  9(16)V99.
           05  INM-GFIS-TRN            PIC  9(05).
           05  INM-DBCR-IND            PIC  9.
           05  INM-DOM-OUTLET          PIC  9(10).
           05  INM-TRN-OUTLET          PIC  9(10).
           05  INM-CONTR-OUTLET        PIC  9(10).
           05  INM-PROD-TYPE           PIC  X(06).
           05  INM-PROD-CLASS          PIC  X(06).
           05  INM-PROD-TERM           PIC  X(06).
           05  INM-PROD-RATE           PIC  X(10).
           05  INM-LINK.
               10  INM-SRC-OWNER       PIC  9(03).
               10  INM-LOAD-DATE       PIC  9(08).
               10  INM-LINK-NO         PIC  9(06).
           05  INM-SRC-SYSTEM          PIC  X(10).
           05  INM-TELLER-CARD         PIC  9(08).
           05  INM-DEVICE-ID           PIC  9(02).
           05  INM-PTC                 PIC  9(04).
           05  INM-VAT                 PIC  9(16)V99.
           05  INM-NARRATION           PIC  X(50).
           05  INM-REF-NO              PIC  X(10).
           05  INM-GL-ACC              PIC  X(15).
           05  INM-RESOURCE            PIC  X(10).
           05  INM-TIME                PIC  9(08).
      *
       FD  INM-LDFILE.
      *
       01  INM-LD-REC                  PIC  X(221).
      *
       SD  SORT-FILE.
      *
       01  SORT-TRN-REC.
           05  SRT-ACNO                PIC  9(10).
           05  SRT-CAPT-DATE           PIC  9(08).
           05  SRT-EFFECT-DATE         PIC  9(08).
           05  SRT-TRN-AMT             PIC  9(16)V99.
           05  SRT-GFIS-TRN            PIC  9(05).
           05  SRT-DBCR-IND            PIC  9.
           05  SRT-DOM-OUTLET          PIC  9(10).
           05  SRT-TRN-OUTLET          PIC  9(10).
           05  SRT-CONTR-OUTLET        PIC  9(10).
           05  SRT-PROD-TYPE           PIC  X(06).
           05  SRT-PROD-TERM           PIC  X(06).
           05  SRT-PROD-RATE           PIC  X(10).
           05  SRT-SRC-OWNER           PIC  9(03).
           05  SRT-SRC-SYSTEM          PIC  X(10).
           05  SRT-TELLER-CARD         PIC  9(08).
           05  SRT-DEVICE-ID           PIC  9(02).
           05  SRT-PTC                 PIC  9(04).
           05  SRT-VAT-AMT             PIC  9(16)V99.
           05  SRT-NARRATION           PIC  X(50).
           05  SRT-REF-NO              PIC  X(10).
           05  SRT-GL-ACC              PIC  X(15).
           05  SRT-RESOURCE            PIC  X(10).
           05  SRT-TIME                PIC  9(08).
           05  SRT-SEQ                 PIC  9(02).
      *
       WORKING-STORAGE                 SECTION.
      *----------------------------------------
       01  W020-COUNTERS.
           05  W020-READ-CNTR          PIC  9(08)  VALUE ZERO.
           05  W020-WRITE-CNTR         PIC  9(08)  VALUE ZERO.
           05  W020-LINK-CNTR          PIC  9(08)  VALUE ZERO.
           05  W020-TRAILER            PIC  9(08)  VALUE 99999999.
      *
           05  SRT-PROD-CLASS          PIC  X(06).
       01  W030-FLAGS.
           05  W030-END-OF-FILE        PIC  X      VALUE 'N'.
               88  W030-EOF                        VALUE 'Y'.
           05  W030-END-OF-SORT        PIC  X      VALUE 'N'.
               88  W030-EOS                        VALUE 'Y'.
      *
       01  W040-TRN-REC.
           05  W040-ACNO               PIC  9(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-EFFECT-DATE        PIC  9(08).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-TRN-AMT            PIC  9(15).99.
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-GFIS-TRN           PIC  9(05).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-DBCR-IND           PIC  9.
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-DOM-OUTLET         PIC  9(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-TRN-OUTLET         PIC  9(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-PROD-TYPE          PIC  X(06).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-PROD-CLASS         PIC  X(06).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-PROD-TERM          PIC  X(06).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-PROD-RATE          PIC  X(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-SRC-SYSTEM         PIC  X(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-SRC-OWNER          PIC  9(03).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-CAPT-DATE          PIC  9(08).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-LINK-CNTR          PIC  9(06).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-CONTR-OUTLET       PIC  9(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-DEVICE-ID          PIC  9(02).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-PTC                PIC  9(04).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-TELLER-CARD        PIC  9(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-SEQ                PIC  9(03).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-TIME               PIC  9(08).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-REF-NO             PIC  X(15).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-RESOURCE           PIC  X(10).
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-HEDGE              PIC  X(10)  VALUE SPACES.
           05  FILLER                  PIC  X      VALUE ','.
           05  W040-LOAD-DATE          PIC  9(08).
      *
       PROCEDURE                       DIVISION.
      *=========================================
       A000-MAIN                       SECTION.
      *----------------------------------------
       A000-ENTRY.
           PERFORM B000-INITIALIZATION.
           PERFORM C000-SORT-CONTROL.
           PERFORM D000-TERMINATION.
           STOP RUN.
       A000-EXIT.
           EXIT.
      *
       B000-INITIALIZATION             SECTION.
      *----------------------------------------
       B000-ENTRY.
           ACCEPT W040-LOAD-DATE.
           OPEN INPUT                  GMT-TRFILE
                OUTPUT                 INM-TRFILE
                                       INM-LDFILE.
       B000-EXIT.
           EXIT.
      *
       C000-SORT-CONTROL               SECTION.
      *----------------------------------------
       C000-ENTRY.
           SORT SORT-FILE ON ASCENDING SRT-TRN-OUTLET
                                       SRT-CAPT-DATE
                                       SRT-TELLER-CARD
                                       SRT-TIME
                                       SRT-SEQ
               INPUT  PROCEDURE C100-INPUT-ROUTINE
               OUTPUT PROCEDURE C200-OUTPUT-ROUTINE.
       C000-EXIT.
           EXIT.
      *
       C100-INPUT-ROUTINE              SECTION.
      *----------------------------------------
       C100-ENTRY.
           PERFORM Z000-READ-FILE.
           PERFORM C110-INPUT-PROCESS  UNTIL W030-EOF.
       C100-EXIT.
           EXIT.
      *
       C110-INPUT-PROCESS             SECTION.
      *----------------------------------------
       C110-ENTRY.
           RELEASE SORT-TRN-REC.
           PERFORM Z000-READ-FILE.
       C110-EXIT.
           EXIT.

       C200-OUTPUT-ROUTINE             SECTION.
      *----------------------------------------
       C200-ENTRY.
           RETURN SORT-FILE AT END
               MOVE 'Y'                TO W030-END-OF-SORT.
           ADD 1                       TO W020-LINK-CNTR.
           PERFORM C210-RETURN-PROCESS UNTIL W030-EOS.
       C200-EXIT.
           EXIT.
      *
       C210-RETURN-PROCESS             SECTION.
      *----------------------------------------
       C210-ENTRY.
           PERFORM Z100-WRITE-FILE.
           RETURN SORT-FILE AT END
               MOVE 'Y'                TO W030-END-OF-SORT.
           IF SRT-SEQ                  = 1
               ADD 1                   TO W020-LINK-CNTR.
       C210-EXIT.
           EXIT.
      *
       D000-TERMINATION                SECTION.
      *----------------------------------------
       D000-ENTRY.
           CLOSE                       GMT-TRFILE
                                       INM-TRFILE
                                       INM-LDFILE.
       D000-EXIT.
           EXIT.
      *
       Z000-READ-FILE                  SECTION.
      *----------------------------------------
       Z000-ENTRY.
           READ GMT-TRFILE
               AT END MOVE 'Y'         TO W030-END-OF-FILE.
           IF NOT W030-EOF
               MOVE GMT-TRN-REC        TO SORT-TRN-REC
               IF GMT-ACNO             = 9999999999
                   MOVE 'Y'            TO W030-END-OF-FILE
                   MOVE GMT-TRN-AMT    TO W020-TRAILER
               ELSE
                   ADD 1               TO W020-READ-CNTR.
       Z000-EXIT.
           EXIT.
      *
       Z100-WRITE-FILE                 SECTION.
      *----------------------------------------
       Z100-ENTRY.
           MOVE SRT-ACNO               TO W040-ACNO
                                          INM-ACNO.
           MOVE SRT-CAPT-DATE          TO W040-CAPT-DATE
                                          INM-CAPT-DATE.
           MOVE SRT-EFFECT-DATE        TO W040-EFFECT-DATE
                                          INM-EFFECT-DATE.
           MOVE SRT-TRN-AMT            TO W040-TRN-AMT
                                          INM-TRN-AMT.
           MOVE SRT-GFIS-TRN           TO W040-GFIS-TRN
                                          INM-GFIS-TRN.
           MOVE SRT-DBCR-IND           TO W040-DBCR-IND
                                          INM-DBCR-IND.
           MOVE SRT-DOM-OUTLET         TO W040-DOM-OUTLET
                                          INM-DOM-OUTLET.
           MOVE SRT-TRN-OUTLET         TO W040-TRN-OUTLET
                                          INM-TRN-OUTLET.
           MOVE SRT-PROD-TYPE          TO W040-PROD-TYPE
                                          INM-PROD-TYPE.
           MOVE SRT-PROD-CLASS         TO W040-PROD-CLASS
                                          INM-PROD-CLASS.
           MOVE SRT-PROD-TERM          TO W040-PROD-TERM
                                          INM-PROD-TERM.
           MOVE SRT-PROD-RATE          TO W040-PROD-RATE
                                          INM-PROD-RATE.
           MOVE SRT-SRC-SYSTEM         TO W040-SRC-SYSTEM
                                          INM-SRC-SYSTEM.
           MOVE SRT-SRC-OWNER          TO W040-SRC-OWNER
                                          INM-SRC-OWNER.
           MOVE W040-LOAD-DATE         TO INM-LOAD-DATE.
           MOVE W020-LINK-CNTR         TO W040-LINK-CNTR
                                          INM-LINK-NO.
           MOVE SRT-CONTR-OUTLET       TO W040-CONTR-OUTLET
                                          INM-CONTR-OUTLET.
           MOVE SRT-DEVICE-ID          TO W040-DEVICE-ID
                                          INM-DEVICE-ID.
           MOVE SRT-PTC                TO W040-PTC
                                          INM-PTC.
           MOVE SRT-TELLER-CARD        TO W040-TELLER-CARD
                                          INM-TELLER-CARD.
           MOVE SRT-SEQ                TO W040-SEQ.
           MOVE SRT-TIME               TO W040-TIME
                                          INM-TIME.
           MOVE SRT-REF-NO             TO W040-REF-NO
                                          INM-REF-NO.
           MOVE SRT-RESOURCE           TO W040-RESOURCE
                                          INM-RESOURCE.
           MOVE SRT-VAT-AMT            TO INM-VAT.
           MOVE SRT-NARRATION          TO INM-NARRATION.
           MOVE SRT-GL-ACC             TO INM-GL-ACC.
           WRITE INM-LD-REC            FROM W040-TRN-REC.
           WRITE INM-TRN-REC.
           ADD 1                       TO W020-WRITE-CNTR.
       Z100-EXIT.
           EXIT.
      *
       END PROGRAM GFDYS580.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Misc.dat is NEXT
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
363710800119970303199702130000000000000840000324010100639999^GM-C             
               001MSCLS     00009611000990000000000000000000MISC              
 
                              0000000016710800                   0957088401
311710800019970303199702270000000000000039590338520100110001010011000101001100
1
                            001MSCLS     00009820000990000000000000000000PETTY
C
ASH BEREA                                  0000061867710800                  
09
36117301
311710800019970303199702270000000000000712380338520100110001010011000101001100
1
                            001MSCLS     00009820000990000000000000008748KEYS
,R
UBBER STAMPS                               0000061866338900                  
09
38087501
311710800019970303199702270000000000000100000338520100110001010011000101001100
1
                            001MSCLS    
00009820000990000000000000000000SHORTAG
E FROM BANK WEST ST                        0000061865811200                  
09
39349301
322710800519970303199702270000000000010000000338520100220000010022000001002200
0
                            001MSCLS    
00009340000990000000000000000000MAITLAN
D BEEMARR                                  0000028840710800                  
10
18454301
322710800519970303199702270000000000001538880338520100220000010022000001002200
0
                            001MSCLS     00009340000990000000000000000000NBS
BAN
K                                          0000030433710800                  
10
20158601
322710800519970303199702270000000000000146550338520100220000010022000001002200
0
                            001MSCLS     00009340000990000000000000000000M
CROOK
                                           0000030434710800                  
10
21141001
311710800019970303199702280000000000000625000338520100110001010011000101001100
1
                            001MSCLS    
00009820000990000000000000000000PAYMENT
 FOR TEMP ON SWITCHBOARD                   0000061864303500                  
09
29150301
311710800019970303199702280000000000000600000338520100110001010011000101001100
1
                            001MSCLS    
00009820000990000000000000000000PERSONE
L LOAN FO M COOPER                         0000061870810500                  
09
31362701
311710800019970303199702280000000000000625000338520100110001010011000101001100
1
                            001MSCLS    
00009820000990000000000000000000PAYMENT
 FOR TEMP SWITCHBOARD 240297-010397        0000061869303500                  
09
34237901
342816700219970303199702280000000000010000000300010100429853010042985301004298
3
                            001MSCLS     00009567000990000000000000000000FLOAT
D
ECREASE                                    0000000000816700                  
09
42052601
318816600319970303199702280000000000050000000300010100180002010018000201001800
2
                            001MSCLS    
00007945000990000000000000000000TELLERS
 FLOAT DECREASE                            0000000000816600                  
09
55512301
318816600319970303199702280000000000050000000300010100180002010018000201001800
2
                            001MSCLS    
00009538000990000000000000000000TELLERS
 FLOAT DECREASE                            0000000000816600                  
10
02428301
318816600319970303199702280000000000050000000300010100180002010018000201001800
2
                            001MSCLS    
00009717000990000000000000000000TELLER 
FLOAT DECREASE                             0000000000816600                  
10
05071401
322710800519970303199702280000000000003755700338520100220000010022000001002200
0
                            001MSCLS     00009340000990000000000000000000J J
HUM
AN                                         0000028843710800                  
10
16243201
312710800819970303199702280000000000000900000338520100120000010012000001001200
0
                            001MSCLS    
00009511000990000000000000000000AGENTS 
COMMISSION                                 0000052216305100                  
11
07092201
312816600519970303199702280000000000100000000338520100120000010012000001001200
0
                            001MSCLS    
00009511000990000000000000000000INCREAS
E TELLERS FLOATS MAIN BRANCH               0000052214816600                  
11
09182501
312710800819970303199702280000000000000800000338520100120000010012000001001200
0
                            001MSCLS    
00009511000990000000000000009800TRANSFE

.................
The file is quite BIG, if anyone requires the whole thing and the source
code, they are available at http://jhbws3.jhb.dec.com/nbs/
The files misc.out & misc.ld  are just ZERO in size.

Thanx, for any help.

Fernando.



[Posted by WWW Notes gateway]
3214.4Explanation of how DEC COBOL handles invalid decimal dataPACKED::BRAFFITTTue Mar 18 1997 09:4340
    I was able to compile and run the program.
    
    Both DEC COBOL on OpenVMS Alpha and DEC COBOL on DIGITAL UNIX detect
    the invalid decimal data in the first record of the input file.
    
    I compiled with
    
    	/CHECK=DECIMAL	OpenVMS Alpha
    	-check decimal	DIGITAL UNIX
    
    This is the expected DEC COBOL behavior with the input file you
    supplied which does not have the required decimal data in the
    appropriate bytes of the expected 248 byte input record.
    
    Then I built a MISC.DAT with a valid 248 byte input record.  The
    program read this record fine and then failed during processing of the
    next (end of file) record later in the program in the Z100-WRITE-FILE
    SECTION.
    
    I think you want to rework the logic in the program so that
    Z100-WRITE-FILE is not done when end of file is deteced.  Also, if you
    have invalid decimal data in the input file, it could be detected just
    after the READ, or more likely it will be detected in Z100-WRITE-FILE
    SECTION which tries to MOVE many of the fields from the input record. 
    If any one of the fields has invalid decimal data, the program will
    abort with:
    
SYSTEM-F-ROPRAND, reserved operand fault.
A numeric string or packed decimal value contains an invalid digit or sign.
    
    as it does for the MISC.DAT you supplied.  Again, this is the expected
    behavior with DEC COBOL when a program attempts a numeric operation
    with invalid decimal data.
    
    One thing you could do to help you identify the bad input records is to
    PERFORM a validation paragraph just after the READ which displays the
    record being processed and attempts to do a numeric operation on each
    numeric field from the input record (for example ADD 0).  In this way,
    you should be able to more easily detect which records have invalid
    decimal data so the records in the input data file can be corrected.
3214.5ThanxNETRIX::&quot;[email protected]&quot;FernandoWed Mar 26 1997 16:349
Howzit!

Many thanx for the prompt and very good reply.
I passed info to the Cust. and just today he
replied with satisfaction.

Cheers,
Fernando.
[Posted by WWW Notes gateway]