MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Message IGZ0026W calling DSFORT from COBOL program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Thu May 24, 2018 7:40 am    Post subject: Message IGZ0026W calling DSFORT from COBOL program Reply with quote

Quote:
IGZ0026W The SORT-RETURN special register was never referenced, but the current
operation in program KQC750 on line number 674 was unsuccessful.


I'm calling DFSORT from my COBOL program and am seeing this message. If I code my JCL as follows:-
Code:

//DFSOUTDD DD  DSN=&TEMP,DISP=(,PASS),             
//             DCB=(RECFM=VB,LRECL=121),           
//             SPACE=(TRK,(2,2),RLSE),UNIT=SYSDA   
//*                                                   
//DFSPARM  DD *                                     
  MSGDDN=DFSOUTDD                                 
/*                                                 

the message is still written to SYSOUT rather than DFSOUTDD.

What more information does anyone need to help me understand WHY I'm receiving this message. I include the sort code (if relevant)
Code:

      *****************************************************************
      *                                                               
      *****************************************************************
       ab-sort-t-userid-tbl section.                                   
      *                                                               
           sort sort-file                                             
             on ascending key sort-cicsid                             
                        input procedure aba-sort-input                 
                        output procedure abb-sort-output.             
      *                                                               
      *    The table will now be sorted on ascending org-nr order     
      *                                                               
           exit.                                                       
      *****************************************************************
      * Input sort routine för CICS userid                             
      *****************************************************************
       aba-sort-input section.                                         
      *                                                               
      *    Loop until we find an "empty" row or we've run out of rows 
      *    in the table                                               
           perform varying x-cics from 1 by 1                         
               until t-cics-userid(x-cics) = ' '                       
                  or x-cics > a-userid-rows                           
      *                                                               
             release sort-record     from t-userid-rader(x-cics)       
      *                                                               
           end-perform                                                 
      *                                                               
           exit.                                                       
      *****************************************************************
      * Output sort routine för CICS userid                           
      *****************************************************************
       abb-sort-output section.                                       
      *                                                               
           perform varying x-cics from 1 by 1                         
               until t-cics-userid(x-cics) = ' '                       
                  or x-cics > a-userid-rows                           
      *                                                               
             return sort-file        into t-userid-rader(x-cics)       
               at end                                                 
                 move 'Finished'       to a-junk                       
             end-return                                               
      *                                                               
           end-perform                                                 
      *                                                               
           exit.                                                       

_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Thu May 24, 2018 7:50 am    Post subject: Reply with quote

Okay, I got rid of the message using the following in my code
Code:

display 'Return code from SORT 'sort-return

This showed the return code to be 16.
Question is, when I review the output from the internal sort, ALL the messages are informational.

What DD name do I need to allocate to see why DFSORT is "complaining" ?
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu May 24, 2018 11:00 am    Post subject: Re: Message IGZ0026W calling DSFORT from COBOL program Reply with quote

misi01 wrote:
Quote:
IGZ0026W The SORT-RETURN special register was never referenced, but the current
operation in program KQC750 on line number 674 was unsuccessful.


I'm calling DFSORT from my COBOL program and am seeing this message. If I code my JCL as follows:-
Code:

//DFSOUTDD DD  DSN=&TEMP,DISP=(,PASS),             
//             DCB=(RECFM=VB,LRECL=121),           
//             SPACE=(TRK,(2,2),RLSE),UNIT=SYSDA   
//*                                                   
//DFSPARM  DD *                                     
  MSGDDN=DFSOUTDD                                 
/*                                                 

the message is still written to SYSOUT rather than DFSOUTDD.


misi01,

That is a COBOL message(IGZ...) that is written to SYSOUT and NOT a DFSORT message(ICe...).

You routed DFSORT messages to DFSOUTDD but then it is a temp file. Unless you are reading that temp file in your next step you will NOT be able to see the DFSORT messages.

so for the time being route it to SYSOUT
Code:

//DFSOUTDD DD SYSOUT=*


Now you will have all the DFSORT messages in the DFSOUTDD file

Also you can make your progam ABEND when SORT issues a return code of 16. It depends on the installation default. The installation option is ERET=RC16 (shipped default) or ERET=ABEND.

If you want to have your program abend in case of return code 16 , you can override it during run time using DEBUG ABEND. Since you already have DFSPARM you just append to it. something like this
Code:

//DFSPARM  DD *                                     
  MSGDDN=DFSOUTDD                                 
  DEBUG ABEND
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Fri May 25, 2018 12:59 am    Post subject: Reply with quote

I tried your suggestion, here are the DFSORT log results (chopped on the right)
Code:

ICE201I 1 RECORD TYPE IS F - DATA STARTS IN POSITION 1                       
ICE118I 0 UNKNOWN FILE SIZE - RECOMMEND SPECIFYING FILSZ=EN TO REDUCE RISK OF
ICE751I 0 C5-BASE   C6-BASE   C7-BASE   C8-I29500 E4-BASE   C9-BASE   E5-I2950
ICE143I 0 BLOCKSET     SORT  TECHNIQUE SELECTED                               
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES
ICE000I 0 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R2  - 07:44 ON FRI
          SORT FIELDS=(0014,0005,CH,A)                                       
          RECORD TYPE=F,LENGTH=(000080,,)                                     
ICE193I 0 ICEAM2 INVOCATION ENVIRONMENT IN EFFECT - ICEAM2 ENVIRONMENT SELECTE
ICE252I 1 PARMLIB OPTIONS WERE MERGED WITH INSTALLATION MODULE DEFAULTS       
ICE089I 1 SIMMICX .KQC750  .        , INPUT LRECL = 80, TYPE = F             
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)                               
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6234096,6234096)                         
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,E
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHAL
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKP
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CF
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXI
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSA
ICE235I 0 OPTIONS: NULLOUT=RC0                                               
ICE236I 0 OPTIONS: DYNAPCT=10 ,MOWRK=Y,TUNE=STOR,EXPMAX=MAX    ,EXPOLD=50%   
ICE750I 0 DC 0 TC 0 CS DSVVV KSZ 5 VSZ 5                                     
ICE752I 0 FSZ=0 RE  IGN=0 C  AVG=80 0  WSP=0 E  DYN=6676 16352               
ICE751I 1 DE-BASE   D5-I29741 D9-BASE   E8-I29741                             
ICE091I 0 OUTPUT LRECL = 80, TYPE = F     
ICE080I 0 IN MAIN STORAGE SORT                                                 
ICE055I 0 INSERT 3282, DELETE 3281                                             
ICE054I 0 RECORDS - IN: 0, OUT: 0                                               
ICE805I 0 JOBNAME: SIMMICX  , STEPNAME: KQC750                                 
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                     
ICE906I 0 ST=ABOVE,SR=6291456,RC=0                                             
ICE907I 0 ST=ABOVE,SA=6291440,NF=1,LF=6291440,SF=6291440                       
ICE906I 0 ST=BELOW,SR=1024000,RC=0                                             
ICE907I 0 ST=BELOW,SA=1023984,NF=1,LF=1023984,SF=1023984                       
ICE992I 0 RA 0 WR 0 TR 2                                                       
ICE887I 0 CSES 0,0,0 ES 0,0,0                                                   
ICE886I 0 SYS 0 TSTG 0 FS 0 INIT 0 MAX 0 LEN 0                                 
ICE915I 0 MOFSZ=16,MOSZ=0,MOSYS=618(5),MOSTG=618,MEML=17592186039795(3)         
ICE916I 0 MOFR=0402,MOVR=VV                                                     
ICE996I 0 ESM=316431,ESO=158215,ESR=31643,ESP=4096,ESS=16384,CES=1009664,HSZ=167
ICE997I 0 HWSP=0,HMAX=0,MOMAX=158208,ASV=158215,EQ=I3,HN=1                     
ICE898I 0 OMAX=0,NMAX=316431,ENQT=158215,CMAX=16384,HU=99,BUN=16352,MD=NK,M2,DU=
ICE880I 0 QP=5 QA=5 HI=39 LI=35 MI=39 TZ=18951 N1=16384 N2=16384 SZ=5 HN=1     
ICE889I 0 CT=MAX     , SB=3, L=0, D=0000, CCW=1MAM                             
ICE901I 0 W 02PP15 04PP15 05PP15 06PP15 03PP11 01PP11                           
ICE906I 1 ST=ABOVE,SR=6234096,RC=0                                             
ICE907I 1 ST=ABOVE,SA=6234080,NF=1,LF=6234080,SF=6234080                       
ICE906I 1 ST=BELOW,SR=48784,RC=0                                               
ICE907I 1 ST=BELOW,SA=40576,NF=1,LF=40576,SF=40576                             
ICE999I 0 PWK=4 PSP=6676 SWK=0 SSP=0 TWK=0 TSP=0 RWK=0 RSP=0 AWK=4 AWP=6676     
ICE025A 0 RECORD COUNT OFF                                                     
ICE052I 0 END OF DFSORT                                                             
Return code from SORT 00016    <----- display from COBOL                                 


I have no work files in my JCL (could that be it ?). The number of records to be sorted are approx 3300 and the record length is 80.
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri May 25, 2018 7:27 am    Post subject: Reply with quote

misi01 wrote:

Code:
                                         
ICE055I 0 INSERT 3282, DELETE 3281                                             
                             
ICE025A 0 RECORD COUNT OFF                                                                                                                       


I have no work files in my JCL (could that be it ?). The number of records to be sorted are approx 3300 and the record length is 80.

Misi01,

DFSORT always writes out a messages with suffix A in case of an error. In this case it is ICE025A which is telling that the record count is off. That count difference is shown as a informational message ICE055I

You read 3282 records but wrote out only 3281 records. You probably skipped writting the last record. Check your output procedure

Check this topic which explains more in detail about ICE025A message

http://www.mvsforums.com/helpboards/viewtopic.php?p=12825&sid=f83459de87800350bf044053357d6de8


You also need to pay attention to another informational message ICE118I to fix the sortwk issues in future

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.icem100/mb00083.htm
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Sat May 26, 2018 1:55 am    Post subject: Reply with quote

As usual, thanks.

I'll check it out on Monday at work (theoretically, this means that my COBOL sort routines have ALWAYS been wrong since I always copy/paste the code. Hmmmmmm)
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Mon May 28, 2018 2:33 am    Post subject: Reply with quote

Okay, I simplified it for myself and stripped the input file I want to sort down to 5 records. They were:-
Quote:

IFMA8
IFAB4
IFKRB
IFAA2
AAA99

My original cobol code was the following:-
Code:

      *    Loop until we find an "empty" row or we've run out of rows
      *    in the table                                             
           perform varying x-cics from 1 by 1                       
               until t-cics-key(x-cics) = ' '                     
                  or x-cics > a-userid-rows    <--- a-userid-rows = # rows in W-S table                     
      *                                                             
             set x1 to x-cics                                       
             display 'Sorting input x-cics 'x1                       
             release sort-record     from t-userid-rader(x-cics)     
      *                                                             
           end-perform                                               

and
Code:

     perform varying x-cics from 1 by 1                     
        until t-cics-key(x-cics) = ' '                 
           or x-cics > a-userid-rows                       
*                                                           
       set x1 to x-cics                                     
       display 'Sorting output x-cics 'x1                   
       return sort-file        into t-userid-rader(x-cics) 
         at end                                             
           move 'Finished'       to a-junk                                   
       end-return                                           
*                                                           
     end-perform                                           

The code above gave the following results:-
Quote:

Before sort
IFMA8
IFAB4
IFKRB
IFAA2
AAA99

ICE055I 0 INSERT 5, DELETE 4 (from DFSORT)

Return code from SORT 00016
After sort
AAA99
IFAA2
IFAB4
IFKRB
IFMA8

(note how the results seem to be sorted nonetheless).

After changing the output code to the following
Code:

     perform varying x-cics from 1 by 1                                   
         until x-cics > a-userid-rows                     
            or v-eof-userfil-ja                           
*                                                         
       set x1 to x-cics                                   
       display 'Sorting output x-cics 'x1                 
       return sort-file        into t-userid-rader(x-cics)
         at end                                                         
           set v-eof-userfil-ja  to true                   
       end-return                                         
*                                                         
     end-perform                                           

I received the following results:-
Quote:

ICE055I 0 INSERT 5, DELETE 5

Return code from SORT 00000
After sort
AAA99
IFAA2
IFAB4
IFKRB
IFMA8


I'll confess I don't really understand why one is correct and the other not, but am prepared to accept it and go with it.

Thanks for pointing me at the output procedure Kolusu.
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon May 28, 2018 12:16 pm    Post subject: Reply with quote

misi01 wrote:

I'll confess I don't really understand why one is correct and the other not, but am prepared to accept it and go with it.

Thanks for pointing me at the output procedure Kolusu.


Misi01,

Most of the cases I have seen has been failure to activate the AT END condition on the RETURN statement. I have seen cases where programs just counted the records and then looped the output procedure that many times, or where a high-value record is sorted as an EOF indicator(you used a SPACES record) for other reasons and is then used in the output procedure to trigger exit from the sort routine.

The rule of thumb for output procedures is that if you have N records, you must do N+1 RETURN statements so the AT END condition is activated.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Tue May 29, 2018 3:26 am    Post subject: Reply with quote

That's what I don't really understand, inasmuch as I did (I think) have the AT END specified (albeit to move the word JUNK to a W-S variable)
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue May 29, 2018 11:20 am    Post subject: Reply with quote

misi01 wrote:
That's what I don't really understand, inasmuch as I did (I think) have the AT END specified (albeit to move the word JUNK to a W-S variable)


misi01,

check this COBOL programming guide link which explains about the OUTPUT PROCEDURE

https://www.ibm.com/support/knowledgecenter/en/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/tasks/tpfio39.htm
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Thu May 31, 2018 3:01 am    Post subject: Reply with quote

A simple follow-on to your comment about using FILSZ. Since I'm running DFSORT from my cobol program, I tried including it in the JCL DFSPARM parameters
as such
Quote:

//DFSPARM DD *
// MSGDDN=DFSOUTDD
// FILSZ=E15000
/*

but am still seeing the ICE118I message for each sort (note that the cobol program is calling SORT twice).

How/where do I specify the FILSZ option ?

BTW, I tried including the following in the JCL:-

Code:

//*                         
//SORTWK01 DD DATACLAS=S3   
//*                         


but that didn't seem to help
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu May 31, 2018 10:49 am    Post subject: Reply with quote

misi01 wrote:
A simple follow-on to your comment about using FILSZ. Since I'm running DFSORT from my cobol program, I tried including it in the JCL DFSPARM parameters
as such
Code:

//DFSPARM  DD *         
//  MSGDDN=DFSOUTDD     
//  FILSZ=E15000       
/*       


but am still seeing the ICE118I message for each sort (note that the cobol program is calling SORT twice).

How/where do I specify the FILSZ option ?


Misi01,

Did you realize that you have 2 slashes "//" before the parms? Didn't you get a JCL error?

Assuming that you did not have the slashes and if you are sorting then you should see the FILSZ in the message ICE752I
Code:


ICE752I 0 FSZ=15000     


There are times that we ignore the estimated file size that you pass if we think we can calculate the file size better. It is in the same message ICE752I

misi01 wrote:

BTW, I tried including the following in the JCL:-
Code:
                         
//SORTWK01 DD DATACLAS=S3   
//*                         


but that didn't seem to help


Just because you specified a JCL sortwork dataset allocation , does not mean DFSORT would use it. There is an installation parameter called DYNAUTO which controls whether dynamic allocation or JCL allocation takes precedence when JCL work data sets are specified.

If your system programmer selected DYNAUTO=IGNWKDD, dynamic allocation takes precedence over JCL allocation (JCL work data sets are actually deallocated). If you want the opposite precedence for selected applications, use the run-time option USEWKDD.

If your system programmer selected DYNAUTO=YES, JCL allocation takes precedence over dynamic allocation. If you want the opposite precedence, you must remove the JCL allocation statements.

If your system programmer selected DYNAUTO=NO, dynamic allocation of work data sets is not used unless you specify the DYNALLOC run-time option. JCL allocation takes precedence over dynamic allocation.

You need to run the following Job to see your site installation defaults
Code:

//STEP0100 EXEC PGM=ICETOOL           
//TOOLMSG   DD SYSOUT=*               
//DFSMSG    DD SYSOUT=*               
//OUT       DD SYSOUT=*               
//TOOLIN    DD *                     
  DEFAULTS LIST(OUT)                 
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Fri Jun 01, 2018 4:12 am    Post subject: Reply with quote

Didn't you realize .... No
Didn't you get a JCL error .... No (not sure what the JCL analyzer is here)

Nonetheless, I changed the JCL to the following
Code:

//DFSOUTDD DD  SYSOUT=*                           
//*                                               
//DFSPARM  DD *                                   
  MSGDDN=DFSOUTDD                                 
  FILSZ=E15000                                     
/*                                                                                             

and then I received the following:-

Quote:

ICE752I 0 FSZ=15000 RE IGN=0 C AVG=120 0 WSP=2338 E DYN=2 53216

and no 118 message.

Many thanks.
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group