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
 

 

IDC3314I **RECORD OUT OF SEQUENCE

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

New User


Joined: 27 Jan 2010
Posts: 17
Location: Louisville, Ky

PostPosted: Tue Aug 07, 2012 11:50 pm    Post subject: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

Hi,

I need a second pair of eyes on an issue I'm having. My shop has a batch job that does the following:

- The batch job de-allocates a VSAM file from the CICS region.
- It sorts 12 flat files created by several other jobs into a single flat file which is then repro'd to the above VSAM file.
- After the repro, the job re-allocates the VSAM back to CICS where it is available to users to browse only. No updates, adds, or deletes. This VSAM file is used to populate a report screen in our application.

Here's the problem:

The batch job abends with IDC33141 on the repro step. Here's what I've done so far:

I've read this post.

I've read VSAM de-mystified, and didn't see anything that would help me out.

I've identified the last good record repro'd from the flat file to the VSAM. I've also identified the first out of sequence record from the flat file as well.

The first record is the last good record written to the VSAM. The second record is the out of sequence record. I've provided CHAR and HEX values.

Code:

File-AID - Browse - TEST.XXXX.XXXXXXX --------------------- LINE 5158 COL 1  80
 COMMAND ===>                                                  SCROLL ===> CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
LS        0460CUSGNEFL     LOC -    GNEFL        0 INBNDS FOR WEEK-     0 LATE L
LS        0460CUSD330                                                           


----+----1----+----2----+--
LS        0460CUSGNEFL     
DE42129001FFFFCEECDCCD00134
320021C00C04603427556300EA0
---------------------------
LS        0460CUSD330     
DE42129001FFFFCEECFFF400134
320021C00C04603424330000E50
---------------------------


The sort card that sorts the 26 byte key is as follows:

Code:

SORT FIELDS=(1,3,CH,A,4,4,PD,A,8,3,PD,A,11,2,CH,A,   
            13,2,CH,A,15,3,CH,A,18,5,PD,A,23,4,BI,A)
OMIT COND=(1,2,CH,NE,C'LS')                         
END                                                 


The VSAM key is defined like this:

Code:

 000015        01  TOT-REC.                                                     
 000016           05 TOT-KEY.                                                   
 000017              10 RPT-OPTION-LS     PIC X(3).                             
 000019 MG0598       10 RPTJULDT-LS       PIC S9(7) COMP-3.                     
 000020              10 RPT-OPT-LS        PIC S9(5) COMP-3.                     
 000021              10 RPTRR-LS          PIC X(2).                             
 000022              10 RPTDD-LS          PIC X(2).                             
 000023 BM1095       10 RPTLOCTP-LS       PIC X(1).                             
 000024              10 RPTCNY-LS         PIC X(2).                             
 000025              10 RPTSLIC-LS        PIC X(5).                             
 000026              10 RPTLNNUM-LS       PIC S9(8) COMP.                       
 000027           05 RPTLINE-LS.                                               
 000028              10 RPTCC-LS          PIC X.                               
 000029              10 RPTDATA-LS        PIC X(79).                           
 000030              10 RPT-LS-TYP-GRP    PIC X(4).                             
 000031              10 FILLER REDEFINES RPT-LS-TYP-GRP  OCCURS 4.             
 000032                 15 RPT-LS-TYP        PIC X.                             
 000034 MG0498       10 FILLER            PIC X(11).                           
 ****** **************************** Bottom of Data ****************************
 
Layout: (XXXXXXXX)                               
                                                 FIELD                         
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START     END  LENGTH 
TOT-REC                                                     1     121     121 
5 TOT-KEY                             GROUP          1      1      26      26 
  10 RPT-OPTION-LS                    XXX            2      1       3       3 
  10 RPTJULDT-LS                      S9(7)          3      4       7       4 
  10 RPT-OPT-LS                       S9(5)          4      8      10       3 
  10 RPTRR-LS                         XX             5     11      12       2 
  10 RPTDD-LS                         XX             6     13      14       2 
  10 RPTLOCTP-LS                      X              7     15      15       1 
  10 RPTCNY-LS                        XX             8     16      17       2 
  10 RPTSLIC-LS                       X(5)           9     18      22       5 
  10 RPTLNNUM-LS                      S9(8)         10     23      26       4 


The job has ran like this forever and just abended with the out of sequence error. My suspisions are that the sort is not sorting the 26 byte key correctly, thus giving me the error.

Thanks in advance for the help.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 08, 2012 12:12 am    Post subject:
Reply with quote

since vsam sorts the key as 26 binary
why don't you sort the file(s) as 26 binary?

i did not even bother to check out your sort card,
but if there is an out of sequence problem
it is because all those sub-fields within the key
are not correctly coded for position and length.

as i said, stop that silliness and sort for the whole 26 at one shot.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Aug 08, 2012 12:14 am    Post subject: Reply to: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

Can you show the output from the REPRO please. Was there a particular reason to REPRO rather than use the KSDS for output from the Sort?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Aug 08, 2012 12:18 am    Post subject: Reply to: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

18,5,PD,A

Are you sure it ran for ever? No changes? Which sort product do you use?

By the way, why is the OMIT coded after the SORT. Logically, the OMIT happens first. It doesn't matter where you put it, but it'll confuse someone some time.
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 Aug 08, 2012 12:36 am    Post subject:
Reply with quote

Hello,

Are all 12 files sorted/combined in one sort step or is the input to the repro a concatenaton of multiple sorted files?

Has anything in the environment been upgraded recently (i.e. since the last time this ran successfully)?

What happens if you run a test sorting on one field of 26 binary (as suggested by dbz)?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Aug 08, 2012 12:52 am    Post subject: Reply to: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

From the DFSORT manual, when describing PD:

Quote:
1. The following are treated as positive sign indicators: F, E, C, A, 8, 6, 4, 2, 0.
2. The following are treated as negative sign indicators: D, B, 9, 7, 5, 3, 1.


So, the first record you showed had a "negative" value, whilst the second was "positive". "negative" is less than "positive", so sorted first.

Code:
  SORT FIELDS=(1,26,CH,A)


CH sorts on all the bits as well, so is same as BI here.

Code:
  SORT FIELDS=(1,26,BI,A)
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 Aug 08, 2012 12:57 am    Post subject: Reply to: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

Hi Bill,

Good catch icon_cool.gif

d
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Aug 08, 2012 1:05 am    Post subject: Reply to: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

It was just as dbz said, I just did the exact "why" :-)
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 08, 2012 1:18 am    Post subject:
Reply with quote

I did not think the TS deserved our efforts to show him why,
especially after all that extensive research he performed and
still came-up with that idiot sort.
Back to top
View user's profile Send private message
Crunch

New User


Joined: 27 Jan 2010
Posts: 17
Location: Louisville, Ky

PostPosted: Wed Aug 08, 2012 1:33 am    Post subject:
Reply with quote

Code:
18,5,PD,A


Bill,

You are correct. I made the change to the sort control and re-ran the repro step. I compared the two datasets (the production version that gets created daily) and the version that I created in development by NDM'ing the 12 flat files from production. The compare identified the "out of sequence" record show above.

Thanks for the help everyone!!! icon_biggrin.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 08, 2012 1:40 am    Post subject:
Reply with quote

Crunch wrote:
I made the change to the sort control


did you change the PD to CH
or
are you now sorting 26,BI,A ?
Back to top
View user's profile Send private message
Crunch

New User


Joined: 27 Jan 2010
Posts: 17
Location: Louisville, Ky

PostPosted: Wed Aug 08, 2012 1:42 am    Post subject:
Reply with quote

Dick,

I did not come up with the sort, it was already coded. Secondly, this forum is used to help developers with legitimate questions. Was my question not legit enough for you? As far as my extensive research is concerned, I guess you've never been under the gun with a production problem? I guess not, since you seem to have all the answers. I came here looking for help, and for those that gave it, I am truly grateful. If you want to call me (or my sort statement) and idiot, well that's on you. From now on, if you see a post from me, don't feel obligated to post, as I am not worthy of your time, sorry to bother you.

icon_biggrin.gif

/rant off
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 Aug 08, 2012 1:48 am    Post subject: Reply to: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

Hi Crunch,

Good to hear it is working - thanks for letting us know icon_smile.gif

And don't worry, several of us "old guys" get testy . . .

d
Back to top
View user's profile Send private message
Crunch

New User


Joined: 27 Jan 2010
Posts: 17
Location: Louisville, Ky

PostPosted: Wed Aug 08, 2012 1:53 am    Post subject:
Reply with quote

Hey Rich,

Good to hear from you..!! It's been a while!!

It's all good!!!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 08, 2012 2:19 am    Post subject:
Reply with quote

for someone 'under the gun to solve production problems'
you seem to have enough time for that good old 'last word'!
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 Aug 08, 2012 2:22 am    Post subject: Reply to: IDC3314I **RECORD OUT OF SEQUENCE
Reply with quote

Wull, shore - the thing is working now . . .

icon_wink.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Aug 08, 2012 5:34 am    Post subject:
Reply with quote

Crunch wrote:
Dick,

I did not come up with the sort, it was already coded. Secondly, this forum is used to help developers with legitimate questions. Was my question not legit enough for you? As far as my extensive research is concerned, I guess you've never been under the gun with a production problem? I guess not, since you seem to have all the answers. I came here looking for help, and for those that gave it, I am truly grateful. If you want to call me (or my sort statement) and idiot, well that's on you. From now on, if you see a post from me, don't feel obligated to post, as I am not worthy of your time, sorry to bother you.

icon_biggrin.gif

/rant off


It took dbz a maximum of 22 minutes to spot the problem. And you don't want his help next time?

Next time, please use the Preview button to check your post is OK before pressing Submit, including checking any links that you have included (click on them from the preview). Without all the editing and checking done for you, you might have had a quicker answer.

Yes, that sort card deserves what it got. Come the day you specify individual items for a key to a VSAM fille, then sort on the individual items. If passing a group-item, sort on the group item. Simple.

Two things you've avoided. Why didn't it fail before? Does the field usually exclusively end in L or another "odd" number? Or does it usually contain a four-digit numeric with a trailing space?

Did you notice yet that you picked the wrong record as being out-of-sequence. The first record shown is out-iof-sequence, not the second.

Oh, and the OMIT.

And why sort to flat tile then REPRO. Why not sort to the KSDS? A timing thing?

EDIT: And why blame sort, which sorts billions of records daily. Why would you think it suddenly misbehaved with you? That gun thing, I guess.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 08, 2012 7:11 am    Post subject:
Reply with quote

My apologies to the forum and to Chuck.

no one will hear the message when laden with barbs.
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


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