IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

logic error IGZ0020S


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Mon Sep 27, 2010 11:51 am
Reply with quote

Hi,

I wrote a cobol program and it compiled successfully. In run jcl totally 5 input files and two output files i used.

In that i have to use gdg(0) as input and gdg(+1) as output. If i use gdg files i got an error as ABENDED S000 U4087

Code:

IGZ0020S A logic error occurred.  Neither FILE STATUS nor a declarative was specified for file RECYCLEI in program VAL6045 at relative location X'1C24'.  The status code was 46.
From compile unit VAL6045  at entry point VAL6045  at compile unit offset +00001C24 at entry offset +00001C24 at address 00009B2C. 



here RECYCLEI is my input gdg(0) dd name and VAL6045 is my programe name.


Suppose if i use two different flat files instead of gdg(0) and gdg(+1) , i didn't get that error
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 27, 2010 12:11 pm
Reply with quote

what does the message hint to You ???
check for a dcb LRECL mismatch
and above all fix Your program in order to provide a FILE STATUS process and all that
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Sep 27, 2010 3:38 pm
Reply with quote

Enrico, what does status 46 have to do with LRECL ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 27, 2010 4:08 pm
Reply with quote

just disjoint generic hints
also
Quote:
Suppose if i use two different flat files instead of gdg(0) and gdg(+1) , i didn't get that error

there is some kind of language barrier here
is the TS asking that if using different files it might work
or the TS is stating that using different files did work my supposition

that' s why I suggested to check differences between the two environments

one of the thing that bothers me most on these forums is the idea that gdg' s
from a program point of view might be different beasts that not-gdg' s

but as usual
without seeing the jcls and the sysouts from the twoo runs
we cannot tell anything
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Mon Sep 27, 2010 4:35 pm
Reply with quote

I have checked the LRECL and it is not a problem.
the following code is used to read my input file.
Code:

READ RECYCLE-FILE-IN NEXT RECORD
IF EOF-RCYCI                                   
   MOVE 'REJECT-FILE (RCYCI)   ' TO ABORT-FILE
   MOVE 'FILE IS EMPTY '         TO ABORT-MSG 
   GO TO   ZZ-ABORT                           
END-IF                                         
IF END-OF-FILE                                 
   SET EOF-RCYCI TO TRUE                       
   MOVE HIGH-VALUES TO RCYCI-KEY-DTL           
   IF EOF-RETEK                               
      SET END-OF-JOB TO TRUE                   
   END-IF                                     
END-IF                                         



I have run my program in XPED when i am using gdg file at the time of second read the program get abend u4807 .

But if use jcl instead of gdg all of records are read successfully with user abend u0018 only not u4087
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 27, 2010 4:39 pm
Reply with quote

Quote:
But if use jcl instead of gdg all of records are read successfully
icon_question.gif icon_rolleyes.gif

please clarify
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 27, 2010 4:40 pm
Reply with quote

The manual indicates for a file status 46:
Quote:
A sequential READ statement was attempted on a file open in the input or
I-O mode and no valid next record had been established because:

• The preceding READ statement was unsuccessful but did not cause an
at-end condition.

• The preceding READ statement caused an at-end condition.
You really need to add the file status clause to your program and display it for the OPEN statement and each READ statement.
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Mon Sep 27, 2010 4:42 pm
Reply with quote

sorry!!!
But if i use flat file instead of gdg all of records read successfully
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Sep 27, 2010 4:57 pm
Reply with quote

VGK,

EOF-RCYCI and END-OF-FILE are apparently two 88-lvls based on some variable.

Since you don't use the file-status clause, you need to have the
AT END phase as part of your READ statement to determine if end-of-file has been reached.

as you have not bothered to provide the jcl of the job for both type of runs,
can not provide you a reason to dispute your conclusion.
but, if the jcl is coded correctly, there is no reason that the step would run differently when using gdg and a non-gdg.

your conclusion is false, but it seems true because you have so much else wrong with your job/program.

provide us with the information that we have requested.
also, a record count of the gdg input file and a record count of the non-gdg input file.

this is a good example where two wrongs does make a right!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top