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
 

 

OUTREC RDW NOT INCLUDED

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: OUTREC RDW NOT INCLUDED
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: 331
Location: USA

PostPosted: Fri May 06, 2016 3:37 am    Post subject: Reply to: OUTREC RDW NOT INCLUDED
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Fri May 06, 2016 4:39 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Fri May 06, 2016 5:26 pm    Post subject: Reply to: OUTREC RDW NOT INCLUDED
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    Post subject:
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: 331
Location: USA

PostPosted: Fri May 06, 2016 11:43 pm    Post subject: Reply to: OUTREC RDW NOT INCLUDED
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    Post subject: Reply to: OUTREC RDW NOT INCLUDED
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Sat May 07, 2016 2:08 am    Post subject:
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    Post subject:
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: 331
Location: USA

PostPosted: Sat May 07, 2016 2:39 am    Post subject: Reply to: OUTREC RDW NOT INCLUDED
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Sat May 07, 2016 3:09 am    Post subject: Reply to: OUTREC RDW NOT INCLUDED
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am
No new posts OUTREC on OUTFIL error rocky_balboa DFSORT/ICETOOL 4 Thu Aug 27, 2015 10:26 am
No new posts OUTREC with IFTHEN Query... mkk157 DFSORT/ICETOOL 1 Wed Aug 26, 2015 5:17 pm
No new posts Syncsort OUTREC Convert Time to forma... navhin SYNCSORT 3 Mon Aug 24, 2015 6:24 pm


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