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

Need help to resolve S0C7 error


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nitinkhobragade1

New User


Joined: 07 Mar 2006
Posts: 16

PostPosted: Sun Apr 29, 2007 10:47 am
Reply with quote

hi ,

I have the records in the file with the following layout:
0000731000073101000000061115110100061220000000225 04200000000061{990010
0000731000073101000000061215110100061220000000225 04200000000061L990010
0000731000073101000000070115110100061220000000225 04200000000061P990010
0000731000073101000000070215110100061220000000225 04200000000061Q990010
0000731000073101000000070315110100070319000000225 04200000000919R990010


I want to sum the fields from column 56 to 66 based on the values present in field from starting from 1 to 22

I am using the following control card for that:

SORT FIELDS=(1,22,CH,A)
SUM FIELDS=(56,11,ZD)

But it gives me the S0C7 error since the values present in the fields from colum 56 to 66 are:
0000000061{
0000000061L
0000000061P
0000000061Q
0000000919R

When I read the same fields (from column 56 to 66) into a cobol program using a working storage variable : 10 ws-amount PIC 9(09)V99 I am able to read them without any error.

When I put a display for this variable , I have got the following display:
Input 0000000061{
Display 00000000610

Input 0000000061L
Display 00000000613

Input 0000000061P
Display 00000000617

Input 0000000061Q
Display 00000000618

Input 0000000919R
Display 00000009199

I don?t want code the logic in a COBOL program to sum these fields,I want to sum these fields in the JCL itself,but I am getting the S0c7 error.

Can anybody please suggest me what need to be done to add these values ?



Regards,
Nitin
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Apr 29, 2007 1:13 pm
Reply with quote

Hello,

Following is your example data with markers placed over it to show position in the record. Unless i made an error, the sign for the zd field is not in pos 66 - it is in pos 65 icon_confused.gif

Code:

0000000001000000000200000000030000000004000000000500000000060000000007
1234567890123456789012345678901234567890123456789012345678901234567890

0000731000073101000000061115110100061220000000225 04200000000061{990010
0000731000073101000000061215110100061220000000225 04200000000061L990010
0000731000073101000000070115110100061220000000225 04200000000061P990010
0000731000073101000000070215110100061220000000225 04200000000061Q990010
0000731000073101000000070315110100070319000000225 04200000000919R990010

Back to top
View user's profile Send private message
nitinkhobragade1

New User


Joined: 07 Mar 2006
Posts: 16

PostPosted: Sun Apr 29, 2007 6:53 pm
Reply with quote

Hi,

I am sorry for writting the records incorrectly .Actually there are 2 spaces after postion 49 (not 1 space).

The correct layout is :
Code:
0000000001000000000200000000030000000004000000000500000000060000000007000
1234567890123456789012345678901234567890123456789012345678901234567890123

0000731000073101000000061115110100061220000000225  04200000000061{990010
0000731000073101000000061215110100061220000000225  04200000000061L990010
0000731000073101000000070115110100061220000000225  04200000000061P990010
0000731000073101000000070215110100061220000000225  04200000000061Q990010
0000731000073101000000070315110100070319000000225  04200000000919R990010


Here the sign for ZD is coming on the 66th pos.

Please let me know how to deal with this.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Sun Apr 29, 2007 7:12 pm
Reply with quote

What is the recfm and lrecl?
Does the dataset you are failing on consist of only these five records?
Please post your JCL and all output prior to the abend.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Apr 30, 2007 2:14 am
Reply with quote

Hello,

If you create an input file with only these 5 records, does the run get a s0c7?

Also, please note the last 4 of the 5 posted records have a negative value (i don't remember whether the { is plus or minus icon_smile.gif )

Is your data FB or VB? If VB, your sort control statements need to be changed.

As Bill requested, posting your jcl and all error info will give us more to work with which will lead to suggestions on how to fix the abend.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Apr 30, 2007 2:32 am
Reply with quote

dick scherrer wrote:
Also, please note the last 4 of the 5 posted records have a negative value (i don't remember whether the { is plus or minus icon_smile.gif )
X'D0', all of them are Dog negative values.....
Back to top
View user's profile Send private message
nitinkhobragade1

New User


Joined: 07 Mar 2006
Posts: 16

PostPosted: Mon Apr 30, 2007 6:28 am
Reply with quote

Here is the code I m using:


Code:
//STEP0010  EXEC PGM=SORT                                       
//SORTIN   DD DSN=input-file1,DISP=SHR         
//SORTOUT  DD DSN=&&CURRES,                                     
//         DISP=(NEW,PASS),                                     
//         UNIT=SYSALLDA,                                       
//         DATACLAS=MEDIUM1,                                     
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                     
//SYSIN   DD *                                                   
          SORT FIELDS=(36,15,CH,A,80,4,ZD,D,74,2,ZD,D,77,2,ZD,D)
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0020  EXEC PGM=SORT                                               
//SORTIN   DD DSN=&&CURRES,DISP=(OLD,PASS)                             
//SORTOUT  DD DSN=output-file1,                         
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                           
//SYSIN   DD *                                                         
          OPTION EQUALS,ZDPRINT                                         
          INREC OVERLAY=(135:101,14,UFF,TO=ZD,LENGTH=11)               
          SORT FIELDS=(36,15,CH,A)                                     
          SUM FIELDS=(135,11,ZD)                                       
          OUTREC BUILD=(1,100,101:135,11,ZD,EDIT=(TTT,TTT,TTT.TT),115,13
          4)                                                           
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0030  EXEC PGM=SORT                                               
//SORTIN   DD DSN=input-file2,DISP=SHR               
//SORTOUT  DD DSN=&&CURRGBR,                                           
//         DISP=(NEW,PASS),                                             
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                           
//SYSIN   DD *                                                         
          SORT FIELDS=(36,15,CH,A,80,4,ZD,D,74,2,ZD,D,77,2,ZD,D)       
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0040  EXEC PGM=SORT                                               
//SORTIN   DD DSN=&&CURRGBR,DISP=(OLD,PASS)                             
//SORTOUT  DD DSN=output-file2,                         
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                           
//SYSIN   DD *                                                         
          OPTION EQUALS,ZDPRINT                                         
          INREC OVERLAY=(135:101,14,UFF,TO=ZD,LENGTH=11)               
          SORT FIELDS=(36,15,CH,A)                                     
          SUM FIELDS=(135,11,ZD)                                       
          OUTREC BUILD=(1,100,101:135,11,ZD,EDIT=(TTT,TTT,TTT.TT),115,13
          4)                                                           
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0050  EXEC PGM=SORT                                               
//SORTIN   DD DSN=input-file3,DISP=SHR             
//SORTOUT  DD DSN=&&CURRAAS,                                           
//         DISP=(NEW,PASS),                                             
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                             
//SYSIN   DD *                                                         
          SORT FIELDS=(1,22,CH,A,29,5,CH,A,35,6,ZD,D)                   
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0060  EXEC PGM=SORT                                               
//SORTIN   DD DSN=&&CURRAAS,DISP=(OLD,PASS)                             
//SORTOUT  DD DSN=output-file3,                       
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                             
//SYSIN   DD *                                                         
          SORT FIELDS=(1,22,CH,A,29,5,CH,A)                             
          SUM FIELDS=(56,11,ZD)                                         
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
                                         
//STEP0070  EXEC PGM=SORT                                           
//SORTIN   DD DSN=input-file4,DISP=SHR         
//SORTOUT  DD DSN=&&CURRAS,                                       
//         DISP=(NEW,PASS),                                         
//         UNIT=SYSALLDA,                                           
//         DATACLAS=MEDIUM1,                                       
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                         
//SYSIN   DD *                                                     
          SORT FIELDS=(1,22,CH,A,29,5,CH,A,35,6,ZD,D)               
/*                                                                 
//SYSPRINT DD SYSOUT=*                                             
//SYSOUT   DD SYSOUT=*                                             
//SYSUDUMP DD SYSOUT=*                                             
//*                                                                 
//STEP0080  EXEC PGM=SORT                                           
//SORTIN   DD DSN=&&CURRAS,DISP=(OLD,PASS)                         
//SORTOUT  DD DSN=output-file4,                   
//         DISP=(NEW,CATLG,DELETE),                                 
//         DISP=(NEW,CATLG,DELETE),                             
//         UNIT=SYSALLDA,                                       
//         DATACLAS=MEDIUM1,                                     
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                     
//SYSIN   DD *                                                   
          SORT FIELDS=(1,22,CH,A,29,5,CH,A)                     
          SUM FIELDS=(56,11,ZD)                                 
/*                                                               
//SYSPRINT DD SYSOUT=*                                           
//SYSOUT   DD SYSOUT=*                                           
//SYSUDUMP DD SYSOUT=*                                           
//*                                                             



I was getting the error in the step 80. I am taking a file in step070 (input-file4 ) with recfm=FB and lrecl=75.There are thousands of such records present in the input file.I just gave you the same five records.

When I move step070 and step080 on the top all the other steps (I mean when I keep them as the first and the second step of the JCL) then I am not getting any error.Its ridiculous to say but I am not getting S0c7 error.I don?t know how its working now.

Also, I am wondering whether I am getting the correct results or not.

In the input file I have the following records(this is the new example):

Code:
0000000001000000000200000000030000000004000000000500000000060000000007000
1234567890123456789012345678901234567890123456789012345678901234567890123

0000731000073101000000061115110100061220000000225  04200000000061L9900101
0000731000073101000000061215110100061220000000225  04200000000061L9900101
0000731000073101000000070115110100061220000000225  0420000000006139900101
0000731000073101000000070215110100061220000000225  0420000000006139900101
0000731000073101000000070315110100070319000000225  0420000000091959900101

In the output file I am getting the just 1 records for them:
Code:
0000000001000000000200000000030000000004000000000500000000060000000007000
1234567890123456789012345678901234567890123456789012345678901234567890123

0000731000073101000000070315110100070319000000225  0420000000091959900101 



in the output file i m getting ouput value 9195 for the sum of
61L
61L
613
613 and
9195

can any one please confirm if the resultant value is correct?.

Regards
Nitin
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Apr 30, 2007 7:45 am
Reply with quote

Hello,

Last things first - the 9195 sum is correct. The other 4 values are 2 entries of 613 and 2 entries of -613, so they zero out.

I'll look at the larger bit and send another reply later - it may be in the morning, depending on how quickly something "jumps out" icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Apr 30, 2007 7:59 am
Reply with quote

Hello,

One quick suggestion - rename your temporary datasets so that you don't have both &&CURRAAS and &&CURRAS. It is possible that when you run the last steps first, you are using the desired file, but when they are run "at the end" the wrong data is being used. I'm a bit blurry-eyed just now and may have looked (a few times) at this incorrectly icon_smile.gif

Is this the actual jcl from a job that ran or abended - i'd expect it to give a jclerror:
Code:
//STEP0080  EXEC PGM=SORT                                           
//SORTIN   DD DSN=&&CURRAS,DISP=(OLD,PASS)                         
//SORTOUT  DD DSN=output-file4,                   
//         DISP=(NEW,CATLG,DELETE),                                 
//         DISP=(NEW,CATLG,DELETE),                             
//         UNIT=SYSALLDA,                                       
//         DATACLAS=MEDIUM1,                                     
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25) 


If this has been manually entered, please copy/past from an actual run. Also, please post the sysout data and messages.

Good luck and i'll check back in the morning. . .
Back to top
View user's profile Send private message
nitinkhobragade1

New User


Joined: 07 Mar 2006
Posts: 16

PostPosted: Mon Apr 30, 2007 9:28 am
Reply with quote

hi dick scherrer,

Yes you are right! i was using incorrect temp datasets.
the problem is solved now ....thanks for your quick help.
here is the jcl u asked for......


Code:
//STEP0010  EXEC PGM=SORT                                           
//SORTIN   DD DSN=TEST.INPUT.FILE1,DISP=SHR                         
//SORTOUT  DD DSN=&&TEMP1,                                         
//         DISP=(NEW,PASS),                                         
//         UNIT=SYSALLDA,                                           
//         DATACLAS=MEDIUM1,                                       
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                       
//SYSIN   DD *                                                     
          SORT FIELDS=(36,15,CH,A,80,4,ZD,D,74,2,ZD,D,77,2,ZD,D)   
/*                                                                 
//SYSPRINT DD SYSOUT=*                                             
//SYSOUT   DD SYSOUT=*                                             
//SYSUDUMP DD SYSOUT=*                                             
//*                                                                 
//STEP0020  EXEC PGM=SORT                                           
//SORTIN   DD DSN=&&TEMP1,DISP=(OLD,PASS)                           
//SORTOUT  DD DSN=TEST.OUT.FILE1,                                   
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                           
//SYSIN   DD *                                                         
          OPTION EQUALS,ZDPRINT                                         
          INREC OVERLAY=(135:101,14,UFF,TO=ZD,LENGTH=11)               
          SORT FIELDS=(36,15,CH,A)                                     
          SUM FIELDS=(135,11,ZD)                                       
          OUTREC BUILD=(1,100,101:135,11,ZD,EDIT=(TTT,TTT,TTT.TT),115,13
          4)                                                           
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0030  EXEC PGM=SORT                                               
//SORTIN   DD DSN=TEST.INPUT.FILE2,DISP=SHR                             
//SORTOUT  DD DSN=&&TEMP2,                                             
//         DISP=(NEW,PASS),                                             
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                         
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                         
//SYSIN   DD *                                                       
          SORT FIELDS=(36,15,CH,A,80,4,ZD,D,74,2,ZD,D,77,2,ZD,D)     
/*                                                                   
//SYSPRINT DD SYSOUT=*                                               
//SYSOUT   DD SYSOUT=*                                               
//SYSUDUMP DD SYSOUT=*                                               
//*                                                                   
//STEP0040  EXEC PGM=SORT                                             
//SORTIN   DD DSN=&&TEMP2,DISP=(OLD,PASS)                             
//SORTOUT  DD DSN=TEST.OUT.FILE2,                                     
//         DISP=(NEW,CATLG,DELETE),                                   
//         UNIT=SYSALLDA,                                             
//         DATACLAS=MEDIUM1,                                         
//         DCB=(LRECL=134,RECFM=FB,BUFNO=25)                         
//SYSIN   DD *                                                       
          OPTION EQUALS,ZDPRINT                                       
          INREC OVERLAY=(135:101,14,UFF,TO=ZD,LENGTH=11)             
          SORT FIELDS=(36,15,CH,A)                                   
          SUM FIELDS=(135,11,ZD)                                     
          OUTREC BUILD=(1,100,101:135,11,ZD,EDIT=(TTT,TTT,TTT.TT),115,13
          4)                                                           
                                                                       
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0050  EXEC PGM=SORT                                               
//SORTIN   DD DSN=TEST.INPUT.FILE3,DISP=SHR                             
//SORTOUT  DD DSN=&&TEMP3,                                             
//         DISP=(NEW,PASS),                                             
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                             
//SYSIN   DD *                                                         
          SORT FIELDS=(1,22,CH,A,29,5,CH,A,35,6,ZD,D)                   
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0060  EXEC PGM=SORT                                               
//SORTIN   DD DSN=&&TEMP3,DISP=(OLD,PASS)                               
//SORTOUT  DD DSN=TEST.OUT.FILE3,                                       
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                             
//SYSIN   DD *                                                         
          SORT FIELDS=(1,22,CH,A,29,5,CH,A)                             
          SUM FIELDS=(56,11,ZD)                                         
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0070  EXEC PGM=SORT                                               
//SORTIN   DD DSN=TEST.INPUT.FILE4,DISP=SHR                             
//SORTOUT  DD DSN=&&TEMP4,                                             
//         DISP=(NEW,PASS),                                             
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                             
//SYSIN   DD *                                                         
          SORT FIELDS=(1,22,CH,A,29,5,CH,A,35,6,ZD,D)                   
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//*                                                                     
//STEP0080  EXEC PGM=SORT                                               
//SORTIN   DD DSN=&&TEMP4,DISP=(OLD,PASS)                               
//SORTOUT  DD DSN=TEST.OUT.FILE4,                                       
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=SYSALLDA,                                               
//         DATACLAS=MEDIUM1,                                           
//         DCB=(LRECL=75,RECFM=FB,BUFNO=25)                             
//SYSIN   DD *                                                         
          SORT FIELDS=(1,22,CH,A,29,5,CH,A)                             
          SUM FIELDS=(56,11,ZD)                                         
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=* 
//SYSUDUMP DD SYSOUT=* 
//*                     
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Apr 30, 2007 7:04 pm
Reply with quote

You're welcome icon_smile.gif

It is now working?

Thanks for posting you new jcl icon_smile.gif
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 -> ABENDS & Debugging

 


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 Need help to resolve a hard edit COBOL Programming 8
Search our Forums:

Back to Top