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
 

 

SYNCTOOL problem: S0C7 in the CTL3CNTL step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
tarunbhardwajleo

New User


Joined: 23 Feb 2007
Posts: 25
Location: Dallas, TX

PostPosted: Tue Mar 06, 2007 4:15 am    Post subject: SYNCTOOL problem: S0C7 in the CTL3CNTL step
Reply with quote

Hi,

Iam trying to sort an 84 byte fixed block file which has a few headers, a number of detail records and a few trailers.
1. The header record has its first two bytes as '10', followed by a timestamp when that header was created.
2. The detail record has its first two bytes as '20'.
3. The trailer record has its first two bytes as '30', followed by a number in the packed decimal format S9(9) Comp-3
4. The number of headers would always be equal to the number of trailers.

I want to build a file out of it that has just the first header present in the given file and just one trailer. In the trailer record that I finally get, the first two bytes, that is '30' should be followed by the sum of numbers present in all the trailer records in the packed decimal format. The detail records should be untouched and should be present in the file between the header and trailer without any editing.

The file looks something like this

Code:


Command ===>                                                  Scroll ===> CSR
****** ***************************** Top of Data *****************************
000001 101999-12-30-23.38.22.113649                                           
000002 205319457130004002       AA   NN                                     
000003 209000001360112006       BP   YN                                     
000004 206191145740208003       CVM  YN                                     
000005 30.....                                                                 
000006 101999-12-30-23.38.22.329272                                           
000007 205319390000001016       DV   NN                                     
000008 209000001360121007       BP   YN                                     
000009 206111210000001014       BP   YN                                     
000010 30.....                                                                 
****** **************************** Bottom of Data ***************************


Thus, in the final output, we should have
Code:

****** ***************************** Top of Data *****************************
000001 101999-12-30-23.38.22.113649                                           
000002 205319457130004002       AA   NN                                     
000003 209000001360112006       BP   YN                                     
000004 206191145740208003       CVM  YN                                     
000005 205319390000001016       DV   NN                                     
000006 209000001360121007       BP   YN                                     
000007 206111210000001014       BP   YN                                     
000008 30.....                                                                 
****** **************************** Bottom of Data ***************************


where the type '30' record should be followed by the number 6(total number of type '20' records) in packed decimal format.

My SYNCTOOL is coded as:

Code:

//PS005   EXEC PGM=SYNCTOOL                                 
//TOOLMSG DD SYSOUT=*                                       
//DFSMSG  DD SYSOUT=*                                       
//INPUT1  DD DSN=PRD.TYB.MULTI.UCS5800.D91NEFO,DISP=SHR     
//T1      DD DSN=&T1,SPACE=(CYL,(5,5),RLSE),DISP=(,PASS)     
//T2      DD DSN=&T2,SPACE=(CYL,(5,5),RLSE),DISP=(,PASS)     
//T3      DD DSN=&T2,SPACE=(CYL,(5,5),RLSE),DISP=(,PASS)     
//CON     DD DSN=*.T1,DISP=(OLD,PASS),VOL=REF=*.T1           
//        DD DSN=*.T3,DISP=(OLD,PASS),VOL=REF=*.T3           
//OUT     DD DSN=PRD.TYB.MULTI.UCS5800.D91NEFO.SORT,         
//             DISP=(NEW,CATLG,DELETE),                     
//             MGMTCLAS=STANDARD,STORCLAS=BASE,             
//             AVGREC=K,SPACE=(84,(1,200),RLSE),             
//             RECFM=FB,LRECL=84                             
//TOOLIN   DD    *                                           
   COPY FROM(INPUT1) USING(CTL1)                             
   COPY FROM(INPUT1) USING(CTL2)                             
   SORT FROM(T2) TO(T3) USING(CTL3)                         
   COPY FROM(CON) TO(OUT)                                   
//CTL1CNTL DD    *                                                     
   INREC FIELDS=(1,83,SEQNUM,1,ZD)                                     
   OUTFIL FNAMES=T1,                                                   
   OMIT=((1,2,CH,EQ,C'10',AND,84,1,ZD,NE,1),OR,1,2,CH,EQ,C'30'),       
   OUTREC=(1,84)                                                       
//CTL2CNTL DD    *                                                     
   OUTFIL FNAMES=T2,                                                   
   OMIT=(1,2,CH,NE,C'30'),                                             
   OUTREC=(1,84)                                                       
//CTL3CNTL DD    *                                                     
   SORT FIELDS=(1,2,CH,A)                                               
   SUM FIELDS=(3,5,PD)                                                 
   END                                                                 
 /*         


The problem is that though am able to get rid off the extra type '10' records but Iam getting a S0C7 in the CTL3CNTL step due to which Iam not able to sum and filter out the type '30' records.
Can any one please help me out with this ??? Thanks in advance !
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 Mar 06, 2007 4:23 am    Post subject:
Reply with quote

Hello,

At a quick glance, it appears that your data is Zoned Decimal while your control statement refers to Packed Decimal. Try changing the PD to ZD in the SUM statement.
Back to top
View user's profile Send private message
tarunbhardwajleo

New User


Joined: 23 Feb 2007
Posts: 25
Location: Dallas, TX

PostPosted: Tue Mar 06, 2007 4:39 am    Post subject:
Reply with quote

Still the same problem !
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Mar 06, 2007 4:44 am    Post subject:
Reply with quote

I'm not real good at this, but from what your code looks like, why aren't just creating T1 as the header with sequence (include the first and 10 only), T2 as the data with sequence (include 20 only) and T3 as the trailer with sequence, summing on the packed field (include 30 only). sort on the 10/20/30 and the seq and drop the seq on output?
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 Mar 06, 2007 7:04 am    Post subject:
Reply with quote

Hello,

What is in the 30 records starting in position 3? Whatever it is, it does not seem to be numeric for 5 bytes.

I copied your step onto my machine, changed the input to dd *, and got the 0c7. I then changed the value in the first 30 record to 11111 and the value in the second 30 record to 22222 and when the "summed" 30 record was created, i have 33333 (the sum). I also changed the SUM to use ZD for my test.

I'd copy/paste my results, but the remote emulator this site uses is fairly horrible - among other things, it doesn't do copy/paste.

When i go back onsite in the morning i'll send my output if you're interested.

Please look at the 5 bytes starting in position 3 of the 30 recs in hex and see if they even look like packed decimal numbers. Might they be comp rather than comp-3?
Back to top
View user's profile Send private message
tarunbhardwajleo

New User


Joined: 23 Feb 2007
Posts: 25
Location: Dallas, TX

PostPosted: Wed Mar 07, 2007 2:50 am    Post subject: Re: SYNCTOOL problem: S0C7 in the CTL3CNTL step
Reply with quote

Hi Dick,

Its S9(9) COMP-3 and it starts from the 3rd byte in the record.... Iam still puzzled as to why am getting the S0C7 abend... its kinda getting on my nerves now...
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 Mar 07, 2007 3:44 am    Post subject:
Reply with quote

Hello,

Please look at the data in hex (TSO/Browse) and post back what is in the first 10 bytes of the '30' records. Hopefully, a test of only a few can be run.

Once you post the hex for the 30 records, we will be able to determine why the 0c7. When you post them, please use the "code" tab at the top of the reply panel. "Code" uses a fixed font and lines up better.

Do you have access to the code that creates the records? A look at that may prove interesting also.

I'll keep an eye out for your reply icon_smile.gif
Back to top
View user's profile Send private message
tarunbhardwajleo

New User


Joined: 23 Feb 2007
Posts: 25
Location: Dallas, TX

PostPosted: Wed Mar 07, 2007 3:59 am    Post subject:
Reply with quote

Hi Dick,

Here is the type '30' record in the hex format. You can see the 5 bytes in Hex starting from pos 3

Code:

206191145740208003       CVM....YN                                             
FFFFFFFFFFFFFFFFFF4444444CED1110ED4444444444444444444444444444444444444444444444
2061911457402080030000000354013F850000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
30.....                                                                         
FF000024444444444444444444444444444444444444444444444444444444444444444444444444
300005C0000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
101999-12-30-23.38.22.329272                                                   
FFFFFF6FF6FF6FF4FF4FF4FFFFFF4444444444444444444444444444444444444444444444444444
101999012030023B38B22B3292720000000000000000000000000000000000000000000000000000


Can't get the code since this file is built up by the network. So we do not have the code for that.

Thanks again for your help !
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 Mar 07, 2007 5:26 am    Post subject:
Reply with quote

You're welcome.

Well, that 30 record looks good. What's the chance of making a copy of the input file and only running 2 "groups of data - verifying that both 30's have a valid packed number?

Is it possible that deeper into the file is one or more corrupted 30?

I'm going to be on the road in a short while, but hope to get back online tonight and tweak my test file to include PD rather than the test i did w/ ZD.
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 Mar 07, 2007 7:48 am    Post subject:
Reply with quote

Hello,

When i patched in some valid packed decimal numbers, the job works. The output has one 30 record with the correct sum in positioins 3-7.

I'm quite certain now that there is one or more corrupt records in the input file.

Good luck and let us know what you find icon_smile.gif
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 Mar 07, 2007 7:52 am    Post subject:
Reply with quote

Ooops,

That should be "positions 3-7" instead of "positioins 3-7" and "fairly certain" rather than "quite certain" icon_smile.gif

Gotta leave a bit of room for "strange magic".
Back to top
View user's profile Send private message
tarunbhardwajleo

New User


Joined: 23 Feb 2007
Posts: 25
Location: Dallas, TX

PostPosted: Mon Mar 12, 2007 9:11 pm    Post subject: Re: SYNCTOOL problem: S0C7 in the CTL3CNTL step
Reply with quote

Hi Dick,

Thanks for your reply. The problem exists with Type '20' records. When the type 20 records are included, I get a S0C7 abend but when I exclude them, the job runs fine and the sum is also calculated correctly for the type '30' records.

Although the my sort logic does not include type '20' records but Iam confused why Iam getting a S0C7 cos of it. Could you please figure out where the problem lies in my logic ?
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 Mar 12, 2007 10:00 pm    Post subject:
Reply with quote

Hello,

How are you including/excluding the 20 records? Are you doing this in the sort or changing the file before it is processedin the sort?

How many records are in the entire file?

If you can post the "set" of records where the 0c7 occurs, we should be able to figure out why.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Mar 13, 2007 1:54 am    Post subject:
Reply with quote

I know it's a stupid question, but it looks like you are summing in cntl3 the type 30 trailers and it looks like you are expecting the type 30 trailers to be in the T2 file but it also looks like the T2 file has no type 30 trailers since the T2 dataset got created by the cntl2 which omits all 30's and includes everything else..... icon_confused.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm


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