View previous topic :: View next topic
|
Author |
Message |
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
Enrico, what does status 46 have to do with LRECL ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
But if use jcl instead of gdg all of records are read successfully |
please clarify |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
sorry!!!
But if i use flat file instead of gdg all of records read successfully |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|