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

OUTREC RDW NOT INCLUDED


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Fri May 06, 2016 3:22 am
Reply with quote

Hi,

I am using following code for sorting

Code:
//SYSIN DD *                                               
     INCLUDE COND=(1,1,CH,EQ,C'P',OR,                     
                   1,30,SS,EQ,X'00')                       
     INREC IFTHEN=(WHEN=GROUP,                             
     BEGIN=(1,1,CH,EQ,C'P'),                               
     PUSH=(31:1,30))                                       
     OUTFIL INCLUDE=(1,30,SS,EQ,X'00'),                   
            BUILD=(31,04,/,1,30)                           
     OPTION COPY                                           
/*           


And both my input file and output file are VB and has the record length of 30. When I run the job I get the error
Code:
WER235A  SORTOUT  OUTREC RDW NOT INCLUDED   


When I run the same code with FB file it works fine. I searched the error and found Positions 1-4 are reserved for the RDW, so you need to write from pos 5 not pos 1.

I tried to write from Pos 5 in BUILD condition and still get the same error

Please help.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Fri May 06, 2016 3:37 am
Reply with quote

Your include condition start from 1, Begin= from 1 and you already know you have a VB and you already know about RDW. Did you do any search/reading before posting?

Post the Sort card you are using on the VB files if it is different than what you have posted.

.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri May 06, 2016 4:39 am
Reply with quote

He is using the same card for VB as per his narration and certainly no research done as I could see many such examples already discussed.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri May 06, 2016 5:26 pm
Reply with quote

If you have a VB you have to offset all your data-locations by four. So your 1,1 in the INCLUDE, for instance, should be 5,1.

When you BUILD your output record, you must always include the existing RDW, which SyncSORT will then maintain for you. So your BUILD should start with 1,4, and then remember the offset for the data positions.
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Fri May 06, 2016 11:04 pm
Reply with quote

Hi I tried the below one and still getting the same error

Whichever is highlighted in red below I have added 4 to previous value

INCLUDE COND=(5,1,CH,EQ,C'P',OR,
5,34,SS,EQ,X'00')
INREC IFTHEN=(WHEN=GROUP,
BEGIN=(5,1,CH,EQ,C'P'),
PUSH=(35:5,30))
OUTFIL INCLUDE=(5,30,SS,EQ,X'00'),
BUILD=(35,30,/,5,30)
OPTION COPY

But in the Build, I am not sure where should I include the 1,4.


This is my complete JCL

Code:
//STEP01 EXEC PGM=SORT                                 
//SYSOUT DD SYSOUT=*                                   
//SORTIN DD DSN=XXXX,DISP=SHR
//SORTOUT DD DSN=YYYYY,             
//         DISP=(NEW,CATLG,DELETE),                     
//         UNIT=SYSDA,                                 
//         SPACE=(TRK,(10,10),RLSE),                   
//         DCB=(RECFM=VB,LRECL=30,BLKSIZE=0)           
//SYSIN DD *                                           
     INCLUDE COND=(5,1,CH,EQ,C'P',OR,                   
                   5,34,SS,EQ,X'00')                   
     INREC IFTHEN=(WHEN=GROUP,                         
     BEGIN=(5,1,CH,EQ,C'P'),                           
     PUSH=(35:5,30))                                   
     OUTFIL INCLUDE=(5,30,SS,EQ,X'00'),                 
            BUILD=(35,30,/,5,30)                       
     OPTION COPY                                       
/*     
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Fri May 06, 2016 11:43 pm
Reply with quote

See this link

.
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Sat May 07, 2016 12:09 am
Reply with quote

Hi,

I modified the code as below

Code:
//SYSIN DD *                                             
     INCLUDE COND=(5,1,CH,EQ,C'P',OR,                     
                   5,34,SS,EQ,X'00')                     
     INREC IFTHEN=(WHEN=GROUP,                           
     BEGIN=(5,1,CH,EQ,C'P'),                             
     PUSH=(35:5,30))                                     
     OUTFIL INCLUDE=(5,30,SS,EQ,X'00'),                   
            BUILD=(1,4,35,30,/,1,4,5,30)                 
     OPTION COPY       


And I get error 'SORTOUT HAS INCOMPATIBLE LRECL'

And when I try to adjust that by reducing number of bytes that written in BUILD
I get the error 'INCLUDE/OMIT FIELD BEYOND RECORD'.

I also tried by adjusting in INCLUDE Condition to read from 5 to 30 position and still get the same error.

Code'd
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Sat May 07, 2016 2:08 am
Reply with quote

dont give lrecl in dcb and let sort determine for you if you have some confusion.
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Sat May 07, 2016 2:30 am
Reply with quote

Still it throws same error after removing LRECL from DCB
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Sat May 07, 2016 2:39 am
Reply with quote

Since it is a variable record file and you are trying to do a substring search (SS), you need to make sure that the records are filled with data till the position you are searching.

e.g. record 1 can have an lrecl of 30 but record 2 can have lrecl of 25. If you do a 5,30,SS then it will give you an error as record 2 doesn't have anything in bytes 26-30.

Hope that helps.

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat May 07, 2016 3:09 am
Reply with quote

You'd best show us the JCL.

There is confusion in what you are doing. You use a data-length of 34 for your INCLUDE COND but overwrite the last four bytes with the PUSH. All your output records have 30 bytes of data, so why is it a variable-length record.

You'd better show some sample data and expected output. Everything in the Code tags to preserve spacing, don't bother trying to highlight things. If they are there and coded, we'll spot them.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
No new posts Getting OUTREC - SHORT REC error for ... DFSORT/ICETOOL 12
No new posts Issues with outrec overlay while extr... SYNCSORT 7
No new posts SEQNUM with TRA=ETOA in OUTREC SYNCSORT 5
Search our Forums:

Back to Top