Page 1 of 1

COBOL compiling error for depending clause

PostPosted: Mon Dec 09, 2013 3:53 pm
by sange-sherin
Hi,

Please find my code below.

FILE SECTION.                                 
FD  DATA-FILE                                 
    RECORDING MODE IS V                       
    RECORD IS VARYING FROM 1 TO 32696         
     DEPENDING ON WS-LENGTH.                 
01  INPUT-REC                   PIC X(32696).
FD  OUTPUT-FILE                               
    RECORDING MODE IS V                       
    RECORD IS VARYING FROM 1 TO 32696.       
     DEPENDING ON WS-LENGTH-OUT.             
01  OUTPUT-REC                  PIC X(32696).


I am getting return code "12" while compiling due to the following error.

IGYDS1089-S   "DEPENDING" was invalid.  Scanning was resumed at the next area "A" item, level-number, or the start of the next clause.


Can anyone help me solve the problem.

Re: COBOL compiling error for depending clause

PostPosted: Mon Dec 09, 2013 3:55 pm
by sange-sherin
I found the problem and it is resolved. Thank you...........

Re: COBOL compiling error for depending clause

PostPosted: Mon Dec 09, 2013 8:30 pm
by Ed Goodman
I'm guessing it was the period at the end of the output file FD line:
RECORD IS VARYING FROM 1 TO 32696.