Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

logic error IGZ0020S

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: logic error IGZ0020S
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10234
Location: italy

PostPosted: Mon Sep 27, 2010 12:11 pm    Post subject: Reply to: logic error IGZ0020S
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: 1280
Location: Belgium

PostPosted: Mon Sep 27, 2010 3:38 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10234
Location: italy

PostPosted: Mon Sep 27, 2010 4:08 pm    Post subject: Reply to: logic error IGZ0020S
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10234
Location: italy

PostPosted: Mon Sep 27, 2010 4:39 pm    Post subject: Reply to: logic error IGZ0020S
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: 8004
Location: Bellevue, IA

PostPosted: Mon Sep 27, 2010 4:40 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us