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
 

 

SYNCSORT - Control field beyond record

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

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Jul 02, 2007 9:19 pm    Post subject: SYNCSORT - Control field beyond record
Reply with quote

I have an input file having an LRECL= 12029
and my output LRECL=8.I used an INREC to reformat my input file

Code:

SORT FIELDS=(7,4,CH,A,26,4,CH,A)   
INREC FIELDS=(1:7,4,5:26,4)
SUM FIELDS=NONE           
END


But i am getting the error
WER027A :
"CONTROL FIELD BEYOND RECORD"

A search with the above error code retrieved the following info.
Explanation: The location of the last byte of a SORT/MERGE control field is
beyond the maximum record length that you specified, or a variable length record is
shorter than the ending location of a specified control field.



Thanks
Arun
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 Jul 02, 2007 9:27 pm    Post subject:
Reply with quote

Hello,

Please look at the last part of page 2 of this topic. It may have the info you need.

http://ibmmainframes.com/viewtopic.php?t=18206&start=15

Just let us know if there are questions after you read this.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Jul 02, 2007 10:20 pm    Post subject:
Reply with quote

Hi dick,

Thanks for ur immediate response.I tried using the VLTEST parameter, but i am getting some other error.My requirement is like this.

Input file format
Code:
01  INPUT-REC.                                   
    05  WS-RGDS.                                     
        10 WS-GROUP1.                             
            15 WS-ID1            PIC S9(9) COMP-3.
            15 CW-ID2            PIC X.           
        10 WS-GROUP2.                               
            15 WS-SDC            PIC 9(04).       
            15 WS-STYLE          PIC 9(09).       
    05  WS-SEQ                   PIC 9(02).       
    05  WS-NBR                   PIC 9(04).       
    05  WS-CDC                   PIC 9(04).       
    05  WS-STO           OCCURS 3000 TIMES       
                             INDEXED BY  WS-INX.     
        10  WS-STO               PIC 9(4).


I need the output file in this format without duplicates:
Code:
01  OUTPUT-REC.
    05  WS-SDC                  PIC 9(04).
    05  WS-CDC                  PIC 9(04).   
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Jul 03, 2007 12:12 am    Post subject:
Reply with quote

Hi

I tried with the same card except for INREC, I gave OUTREC and it worked fine !!..Could anybody plz explain what was wrong with the INREC.

Thanks
Arun
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: Tue Jul 03, 2007 12:44 am    Post subject:
Reply with quote

I don't usually answer Syncsort questions, but this is really more of a general question so I will.

INREC is processed before SORT. OUTREC is procesed after SORT.

Your INREC statement creates an 8-byte record. So you get the error message when your SORT statement uses 26,4 which is beyond the 8-byte record.

But with OUTREC, you SORT on the input record and then create the 8-byte output record so you don't get an error message.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Jul 03, 2007 1:19 pm    Post subject:
Reply with quote

Hi Frank

Thank u so much.

Arun
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Jul 03, 2007 1:25 pm    Post subject:
Reply with quote

Hi

I have read somewhere that INREC is better than OUTREC while considering performance as we wont be sorting unwanted fields.Is it possible to use INREC in this scenario?..

Correct me if I am wrong

Thanks
Arun
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Jul 03, 2007 1:46 pm    Post subject:
Reply with quote

Arun,

Quote:
I have read somewhere that INREC is better than OUTREC while considering performance as we wont be sorting unwanted fields.Is it possible to use INREC in this scenario?..


It depends. As Frank said - "INREC is processed before SORT. OUTREC is procesed after SORT."

If you are not sorting the file (i.e., when you use sort fields=copy), perfomance of both INREC and OUTREC is similar.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Jul 03, 2007 5:41 pm    Post subject:
Reply with quote

Hi Murali,

Thanks for ur reply. I need a SORT as well as a format change.So it is not possible to use INREC to format the input before the SORT in my requirement..right??

Thanks
Arun
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Jul 03, 2007 5:48 pm    Post subject:
Reply with quote

Arun,

Quote:
So it is not possible to use INREC to format the input before the SORT in my requirement..right??


Not exactly. Assume your IP file is 80 in length and you wanted your OP file to be 85 (say you wanted some data from 81 to 85) and wanted to sort on 1-10 columns. Even in this situation, you could use either INREC/OUTREC.

If you use INREC, SORT sees your IP file 85. Whereas if you use OUTREC sort sees your IP file as 80 in lenght. As Frank mentioned -

Quote:
INREC is processed before SORT. OUTREC is procesed after SORT.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Jul 03, 2007 6:51 pm    Post subject:
Reply with quote

Hi Murali,
Quote:
So it is not possible to use INREC to format the input before the SORT in my requirement..right??

I understood the difference between INREC and OUTREC.What I said was I wont be able to use INREC in my case.If it is possible then could you please post the sort card here..

Thanks
Arun
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: Tue Jul 03, 2007 8:28 pm    Post subject:
Reply with quote

Yes, you can use INREC in this case. You just have to sort on the reformatted record like this:

Code:

  INREC FIELDS=(1:7,4,5:26,4)
  SORT FIELDS=(1,4,CH,A,5,4,CH,A)
  SUM FIELDS=NONE
Back to top
View user's profile Send private message
annujp

New User


Joined: 31 Aug 2005
Posts: 39
Location: St Paul,MN

PostPosted: Wed Jul 04, 2007 12:48 am    Post subject: Is your file VB?
Reply with quote

If your file has a variable block then you can end up with this error. Do let us know if it worked fine with the sortcard Frank mentioned.
Thanks
Anitha
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: Wed Jul 04, 2007 12:57 am    Post subject:
Reply with quote

If the input file was VB, then the RDW would be missing from the INREC statement and I would expect a different error - at least DFSORT would give a different error. (This is why I generally don't answer Syncsort questions - because I have to guess what Syncsort would do as opposed to knowing what DFSORT would do.)
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Thu Jul 05, 2007 8:00 pm    Post subject:
Reply with quote

Hi Frank

Thank u so much.Mine is a FB record.I ll check it and get back to you later as I am out of office this weekend.

Thanks
Arun
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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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