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
 

 

ICE071A B INVALID RETURN CODE FROM EXIT E35

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Searchman

New User


Joined: 28 Dec 2006
Posts: 80
Location: France

PostPosted: Sat Apr 14, 2007 3:57 am    Post subject: ICE071A B INVALID RETURN CODE FROM EXIT E35
Reply with quote

We have this error at every time, even if the file is correctly sorted :

Quote:
ICE071A B INVALID RETURN CODE FROM EXIT E35 - RC=4, CASE=S1
ICE751I 1 DE-K10929 D5-K05352 C4-K90000 D3-K10929 D7-Q91626 E8-K11698
ICE052I 0 END OF DFSORT
IGZ0026W The SORT-RETURN special register was never referenced, but the
current
operation in program ARDJ110E on line number 2317 was
unsuccessful.


What does it mean exactly ?

ARDJ110E is a COBOL program in which return code is forced to zero, else the step falls down at every time. icon_sad.gif

The problem occurs when there is not enough space in workspace because, in this case, the process falls down, but several steps after !
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Apr 14, 2007 4:53 am    Post subject:
Reply with quote

In DFSORT terms: Your COBOL program is using an E35 that deletes all of the records (no SORTOUT). But when DFSORT tells the E35 that there are no more output records, the E35 is passing back RC=4 (delete record) instead of RC=8 (do not return). RC=4 is invalid in this situation.

I don't know COBOL, so I can't tell you what you're doing wrong in the COBOL program. Maybe somebody else can.

You could probably bypass the error using:

Code:

//DFSPARM DD *
  OPTION EXITCK=WEAK
/*


which will tell DFSORT to accept the invalid RC=4 as if it were RC=8. But that will mask the error in the COBOL program which may not be the best strategy.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Apr 14, 2007 5:18 am    Post subject:
Reply with quote

Hello,

Do you have access to the source code that is running in the E35 exit? It may be assembler or COBOL or maybe even something else.

Please post the SORT code in the COBOL program (unless the only COBOL is the E35 exit code).

Also, please post the JCL & control statements for this step.
Back to top
View user's profile Send private message
Searchman

New User


Joined: 28 Dec 2006
Posts: 80
Location: France

PostPosted: Sat Apr 14, 2007 6:18 pm    Post subject: Re: ICE071A B INVALID RETURN CODE FROM EXIT E35
Reply with quote

Hello,

Here is the source COBOL I'm examining.

I have noticed that INPUT procedure names a section and OUTPUT procedure a paragraph ; it's not very nice icon_confused.gif but could it be the reason of RC=4 ?

On Monday, I'll try to send you the JCL.

I don't understand "that deletes" because there's no delete in the program :
Quote:
Your COBOL program is using an E35 that deletes all of the records (no SORTOUT). But when DFSORT tells the E35 that there are no more output records, the E35 is passing back RC=4
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Apr 14, 2007 8:44 pm    Post subject:
Reply with quote

The "delete" is the COBOL E35's way to tell DFSORT that it is handling the output records itself rather than passing them back to DFSORT. As far as DFSORT is concerned, the COBOL E35 is deleting each record passed to it. But as far as the COBOL E35 is concerned, it's processing those records. It's just the way the interface works.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Apr 14, 2007 9:20 pm    Post subject:
Reply with quote

Hello,

Might you be able to post the code from the E35 exit (please see below)?

If i was working on this program, i'd first make a copy to experiment with.

With the copy, i'd re-sequence the sections and paragraphs - the way they now are will not confuse the compiler, but it may confuse people.

This
Code:

      SORT    FIC-SORTWK-T ASCENDING  DAM-CLEF-K OF ERG-SORTWK-T
                                    DAM-STA-CAP-DT OF ERG-SORTWK-T
                                    DAM-STA-CAP-CD OF ERG-SORTWK-T

                                   INPUT  PROCEDURE 1500-TRT-FORMAT
                                           THRU 1999-FIN-INPUT
                                   OUTPUT PROCEDURE 2000-TRT-TASSEMENT
                                           THRU 2999-FIN-OUTPUT

2000-TRT-TASSEMENT SECTION.

does not follow with
Quote:
I have noticed that INPUT procedure names a section and OUTPUT procedure a paragraph ; it's not very nice but could it be the reason of RC=4 ?

Note that the "2000-TRT-TASSEMENT SECTION" follows the 9000-paras.

After the sort, this "PERFORM 3000-AD-FIN" is issued. 3000-AD-FIN is in the input procedure section. This may work, but i always execute "input procdure" code while processing the "input procedure" and the same with "output procedure" code.

Please make sure all of the code is in the appropriate section and run with the "new" code. If anything is needed in both the input and output procedure, your best bet is to move it to another section. The same is true of the PERFORM 3000-AD-FIN code.

While this may seem off-base - how do we know there actually is some E35 exit code being used (other than the error message)? From my experience the cobol/"internal sort" gets "bent" when it is interrupted - most often an 0c4 is shown, but other things have occured.

We're here when you have new info icon_smile.gif
Back to top
View user's profile Send private message
Searchman

New User


Joined: 28 Dec 2006
Posts: 80
Location: France

PostPosted: Sat Apr 14, 2007 9:50 pm    Post subject: Re: ICE071A B INVALID RETURN CODE FROM EXIT E35
Reply with quote

What do you call the "code from the E35 exit" ?
Quote:

Might you be able to post the code from the E35 exit (please see below)?


There's no code but the COBOL program I sent.

I Think your idea is very good an close to mine : in fact, Input procedure should be closed after thru, but the section himself is not closed when 3000-AD is performed ; so, if that's true, the procedure output could give a RC=4...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Apr 14, 2007 11:20 pm    Post subject:
Reply with quote

Hi Searchman,

This "the E35 exit " is from the error info you posted
Quote:
ICE071A B INVALID RETURN CODE FROM EXIT E35 - RC=4, CASE=S1
ICE751I 1 DE-K10929 D5-K05352 C4-K90000 D3-K10929 D7-Q91626 E8-K11698
ICE052I 0 END OF DFSORT
IGZ0026W The SORT-RETURN special register was never referenced, but the
current
operation in program ARDJ110E on line number 2317 was
unsuccessful.


What is the code just before and after "line number 2317"? The code you posted does not have the line numbers generated by the compiler - typically it won't due to the compiler generating new line numbers at compile time (with copybooks expanded, or pre-compiler syntax expanded).

I'm suspicious that there is an "exit routine" actually being used. If the cobol code did something "bad" but not completely "fatal", there may be strange manifestations.

There should be more info in your output - messages from the sort. There may be a "dd statement missing" message - if there is, put one into the jcl and re-run (it will most lilkely be a "sysout" dataset.

I'll check back later today.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sat Apr 14, 2007 11:35 pm    Post subject:
Reply with quote

Quote:
I'm suspicious that there is an "exit routine" actually being used.
IIRC, the input and output procedures for the COBOL SORT are the E15 and E35 exits to the SORT.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Apr 15, 2007 7:30 am    Post subject:
Reply with quote

My bad - i should have said a "separate bit of code" for the E35 exit.

And yup, i believe the i/p and o/p procedures behave like exit routine code. The big difference being that in an internal sort, the COBOL run unit is "in charge" and with an external sort using one or both of those exits, the sort is "in charge".
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sun Apr 15, 2007 8:49 pm    Post subject:
Reply with quote

I'm not sure what the point about the E35 exit is. When you use a COBOL SORT verb, COBOL generates an internal E35 exit that it uses to interface with DFSORT. That's the E35 exit I'm talking about.

A separate COBOL E35 exit is a different animal - it would require passing the name of the E35 exit to DFSORT in a MODS statement.

In the Programmer Response for ICE071A, it says:

Quote:
In a COBOL-invoking program containing an input or output procedure, check that control passes through the end of the input procedure before the output procedure is entered, and through the output procedure before the sort is ended.


I don't know COBOL so I don't know what it means, but perhaps it applies here.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Apr 15, 2007 11:38 pm    Post subject:
Reply with quote

Hi Frank,

Yes - it does.
Quote:
but perhaps it applies here.


The problem (IMHO) is that the COBOL code is not properly structured (that was some of the earlier discussion). As i mentioned earlier, using code that is not in the proper "section" most often causes an 0c4.

The chat about the E35 was to confrim that there was no external E35 code and that we were all on the same page. Sorry if it was mis-leading.

Once all of the code is used only in the proper sections i believe the posted issue will be resolved.
Back to top
View user's profile Send private message
Searchman

New User


Joined: 28 Dec 2006
Posts: 80
Location: France

PostPosted: Mon Apr 16, 2007 1:04 am    Post subject: Re: ICE071A B INVALID RETURN CODE FROM EXIT E35
Reply with quote

Yes, I confirm, there's no 35 exit but the COBOL program.

I'll test tomorrow with section in place of paragraph in 1999-FIN-INPUT
as in 2999-FIN-OUTPUT, and check code around line number 2317.

Note that cobol reference manual don't specify procedure name 1 and procedure name 2 must be of same type (both paragraph or both section)
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 16, 2007 3:34 am    Post subject:
Reply with quote

Hello,

Please review the previous info. If i recall correctly, both your input and output procedures refer to a section not a paragraph. It gets confusing as the numbering scheme is not consistent.

As was also pointed out previously, the input procedure and output procedure are executed as though they were "exits". There is a mechanical and an external difference, but they work within the "exit reoutines".

Also, if memory serves, it is the code that "crosses sections" that is causing the problem(s). Make sure that all of the code is executed in the proper section.
Back to top
View user's profile Send private message
Searchman

New User


Joined: 28 Dec 2006
Posts: 80
Location: France

PostPosted: Mon Apr 16, 2007 3:39 pm    Post subject: Re: ICE071A B INVALID RETURN CODE FROM EXIT E35
Reply with quote

I've run the program modified (without section)
it's still the same icon_sad.gif

Quote:

ICE071A B INVALID RETURN CODE FROM EXIT E35 - RC=4, CASE=S1
ICE751I 1 DE-K10929 D5-K05352 C4-K90000 D3-K10929 D7-Q91626 E8-K11698
ICE052I 0 END OF DFSORT
IGZ0026W The SORT-RETURN special register was never referenced, but the current
operation in program ARDJ110E on line number 2317 was unsuccessful.



About line 2317 :
Quote:

2314
2315 * TRI INTERNE
2316
2317 SORT FIC-SORTWK-T ASCENDING DAM-CLEF-K OF ERG-SORTWK
2318 DAM-STA-CAP-DT OF ERG-SORTWK
2319 DAM-STA-CAP-CD OF ERG-SORTWK
2320
2321 *--* NARS6003
2322 INPUT PROCEDURE 1500-TRT-FORMAT
2323 THRU 1999-FIN-INPUT
2324 OUTPUT PROCEDURE 2000-TRT-TASSEMENT
2325 THRU 2999-FIN-OUTPUT



Step of JCL run :
Quote:

//** STEP ARVPCAF PGM=ARDJ110E ** ID=CAF
//************************************
//ARVPCAF EXEC PGM=ARDJ110E
//* COND=((1,EQ,&EXCAF),(51,LT,FROM),(51,GT,TO))
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUA DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//*
//ARDJ1001 DD DSN=PAR0.ARV10A56(0),DISP=SHR
//*
//ARDJ1002 DD DSN=EXDU.SCI.ARDJ1034,DISP=(NEW,CATLG,DELETE),RECFM=FB,
// LRECL=130,SPACE=(TRK,(3386,1355),RLSE),
// DATACLAS=MULTIVOL,STORCLAS=STDGDG,MGMTCLAS=GDGML1
//*
//*ORTCNTL DD DSN=EXPL.PREP4.PARMFIX2(SORTCN08),DISP=SHR
//SORTCNTL DD DSN=SARA.PBG0.JCL.MC(SORTCN08),DISP=SHR
//*
//* FICHIER DES COMPTES DE GESTION
//CPTGEST0 DD DSN=PAR0.ARGEST10,DISP=SHR
//*
//CPTGEST DD SUBSYS=(BLSR,'DDNAME=CPTGEST0','HBUFND=200','HBUFNI=50',
// 'RMODE31=ALL','MSG=I')
//*
//SPI2TAB DD DSN=PSP0.CICS.SPIU0000,DISP=SHR,
// AMP=(AMORG,'BUFND=50','BUFNI=10')
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Apr 16, 2007 6:29 pm    Post subject:
Reply with quote

Searchman,

Did you read what Frank wrote:
Frank Yaeger wrote:
In the Programmer Response for ICE071A, it says:
Quote:
In a COBOL-invoking program containing an input or output procedure, check that control passes through the end of the input procedure before the output procedure is entered, and through the output procedure before the sort is ended.
It is a fairly strong indication that your program is mis-behaving.
Try some displays at entry and exit form the input and output procedures to see if it is cutting corners.
Back to top
View user's profile Send private message
Searchman

New User


Joined: 28 Dec 2006
Posts: 80
Location: France

PostPosted: Tue Apr 17, 2007 2:18 pm    Post subject: Re: ICE071A B INVALID RETURN CODE FROM EXIT E35
Reply with quote

Hi,

The forum has been unavailable for a few hours...

About the E35 Pb, I've found the solution! It's a bug in the output procedure (so, E35) :

Quote:

* PERFORM UNTIL DAM-CLEF-K OF WS-REC-MVT-OUT = HIGH-VALUE
PERFORM UNTIL DAM-CLEF-K OF WS-SORTWK = HIGH-VALUE
MOVE WS-SORTWK TO WS-REC-MVT-OUT
PERFORM 2100-RETURN-MVT


The sentence in commentary is the wrong one (in prod)
Test is made with WS-REC-MVT-OUT instead of WS-SORTWK, that's the bug. Then, one RETURN is done after the last one (which moves H-V, see below) this causes the OUTPUT PRODEDURE to be interrupted with RC=4.

Quote:

2100-RETURN-MVT.
-------------------
RETURN FIC-SORTWK-T INTO WS-SORTWK AT END
MOVE HIGH-VALUE TO WS-SORTWK.



Note there's no problem with sections and paragraphs even if it is bad writing !

Conclusion : the importance of return code to be tested !

Question : about return codes : where (link) can I find return codes of RETURN and RELEASE and more generally VSAM ?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 17, 2007 11:33 pm    Post subject:
Reply with quote

Hello,

Yup, until now, the last i was able to access the site was late Sunday evening. Sorry to be delinquent icon_smile.gif

I'm suspicious that there may be something (at least) questionable with the code. What kind of "return code" are you looking for? After implementing several thousand internal sorts on many platforms, i have never tested "return codes" after a RELEASE or a RETURN. With the RETURN, there is an AT END i've used every time, but nothing else. Once the code proceeds beyond the SORT statement, it is a good idea to check SORT-RETURN to ensure there was a successful sort.

It sounds like your SORT terminated with the equivalent of a "read after end-of-file". Because it happened inside the sort, sort intercepted the abend and abnormally ended sorting (the program may have created the desired output, but the sort detected a problem).

What is in your SORTCNTL member (just curious)?

What kind of VSAM info are you looking for?

Good to hear you've found the bug icon_smile.gif
Back to top
View user's profile Send private message
Searchman

New User


Joined: 28 Dec 2006
Posts: 80
Location: France

PostPosted: Wed Apr 18, 2007 3:11 am    Post subject: Re: ICE071A B INVALID RETURN CODE FROM EXIT E35
Reply with quote

You're right, it's no use to test inside the output (or input) procedure because, as you say
Quote:
Because it happened inside the sort, sort intercepted the abend and abnormally ended sorting
, juste after the return too much, the process cannot continue indide the output procedure. So, the control of sort-return must be done after the sort instruction.

In SARA.PBG0.JCL.MC(SORTCN08), there is one card :
Quote:

OPTION FILSZ=E80000


About return codes I meant, after OPEN, CLOSE, READ, WRITE, etc.
do you know a link ?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2007 4:02 am    Post subject:
Reply with quote

Hello,

I believe you can find everything you want from the sections in the COBOL manual, VSAM Services for DFSMS, and the DFSORT manual - all are linked to from the "Manuals" link at the top of the page.

If there are other topics you are interested, let me know.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts DFHWS2LS return value divated CICS 4 Mon Nov 07, 2016 5:44 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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