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
 

 

Merging 3 records into 1 record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Mar 11, 2011 2:08 am    Post subject: Merging 3 records into 1 record
Reply with quote

Hi All,

I was trying to merge 3 records into one record.I used the approach mention by Ronald in
http://ibmmainframes.com/viewtopic.php?t=53716&highlight=111x
but when I am using it, it is giving error INVALID DATA SET ATTRIBUTES SPECIFIED SORTIN LRECL. Lrecl of my input dataset is 80.I overrided it with 240 as I have 3 records.

THe post was related to syncsort. Can we override the LRECL in DFSORT.

Thanks.
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: Fri Mar 11, 2011 2:17 am    Post subject:
Reply with quote

If you have the latest DFSORT PTF (Oct, 2010), you can actually use the RESIZE operator of DFSORT's ICETOOL to do this kind of thing quite easily without having to mess with the LRECL. For details and examples, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242

However, if you don't have that PTF, you can override the LRECL with DFSORT. I would have to see your actual JES log (JCL, messages) to help you figure out what you did wrong.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Mar 11, 2011 2:55 am    Post subject:
Reply with quote

Two reasons that come to mind that might cause this error using the technique I suggested are:
a) the input file RECFM is V or VB (the technique will NOT work for Variable Length files).
b) if SORTIN was a concatenation of files and you did NOT override the LRECL on EACH of the files in the concatenation

Without seeing the JCL, the File attributes (obtainable via ISPF 3.4), and the JES log, it is difficult to guess what actually caused the error. Obfuscate DSN's, data, etc. that are proprietary/ personal/rivate, as necessary.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Mar 11, 2011 3:06 am    Post subject:
Reply with quote

Code:
//JK2     EXEC PGM=SORT                                               
//SYSOUT  DD SYSOUT=*                                                 
//DFSMSG  DD SYSOUT=*                                                 
//SORTIN  DD DSN=AAA.BBBBB.CCCCC(RAHUL4),DISP=SHR,             
//           DCB=(RECFM=FB,LRECL=240)                                 
//SORTOUT DD DSN=AAA.BBBBB.CCCC.INPUT,DISP= (NEW,CATLG,DELETE),
//           UNIT=SYSDA,DCB=(RECFM=FB,LRECL=80)                       
//SYSIN DD *                                                         
 SORT FIELDS=COPY                                                     
 OUTREC FIELDS=(60,10,X,35,2,X,115,2,X,195,2,43X)                     
 END                                                                 
/*                                                                   


Error
Code:
           SORT FIELDS=COPY                                     
           OUTREC FIELDS=(60,10,X,35,2,X,115,2,X,195,2,43X)     
           END                                                 
ICE043A 3 INVALID DATA SET ATTRIBUTES SPECIFIED SORTIN   LRECL 
ICE751I 0 C5-K51706 C6-K51706 C7-K51706 C8-K51706 E7-K51706     
ICE052I 3 END OF DFSORT                                         
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Mar 11, 2011 3:29 am    Post subject: Reply to: Merging 3 records into 1 record
Reply with quote

the only drawback of using the LRECL trick is that it will not work if the blocksize is not multiple of both LRECL' s

an lrecl of 80 and the optimum blksize of 27920 will give 349 records per block

and since 349 is prime any <pseudo reblocking> will fail
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Mar 11, 2011 3:46 am    Post subject:
Reply with quote

Enrico, I believe that you have exposed the probable cause.
My fault for not having mentioned the blksize caveat in the prior thread, and in this one.

As an aside, I created an 80 byte dataset containing 6 records (which ended up being blocked at 27920, just as you surmised) and the subsequent SORT failed with the same error indicated by rgupta71. I then re-created the SORTIN dataset with a blksize of 480 and the sort worked like a charm.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Mar 11, 2011 5:16 am    Post subject: Reply to: Merging 3 records into 1 record
Reply with quote

Thanks Enrico and Ronald.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Mar 11, 2011 8:31 pm    Post subject: Reply to: Merging 3 records into 1 record
Reply with quote

I changed the blocksize
For sortin
Code:
DCB=(RECFM=FB,LRECL=240,BLKSIZE=2400)

For sortout
Code:
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800) 


Below error is coming
Code:
0 EXCP ACCESS METHOD USED FOR SORTOUT                               
0 EXCP ACCESS METHOD USED FOR SORTIN                                 
5 I/O ERROR, DD SORTIN  , DEV A83E, ECB 41, CSW 0C40, SENSE 0000     
1 EF-K49534 F0-K30362 E8-K51706                                     
0 END OF DFSORT


Thanks.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Mar 11, 2011 10:24 pm    Post subject:
Reply with quote

If an input dataset RECFM is FB, the LRECL can only be overridden as long as the existing BLKSIZE is an exact multiple of the revised LRECL, since LRECL is really just a "logical" attribute - that is, LRECL stands for LOGICAL record length. For example, a BLKSIZE of 400 could contain either 4 100-byte LOGICAL records, or 5 80-byte LOGICAL records, or 8 50-byte LOGICAL records, or 10 40-byte LOGICAL records, etc.

However, an input dataset's BLKSIZE is a "physical" attribute, and it can NOT be successfully overridden. The actual size of every block of an FB dataset must be equal to the (implicit or explicit) BLKSIZE except for the LAST block in the dataset, which can be a "short" block. But whether an FB dataset's block is "standard" or "short", it must always be an exact multiple of the LRECL (whether implicit or explicit).

If your input dataset BLKSIZE is not a multiple of your override LRECL, then the dataset must be reblocked to a BLKSIZE that IS a multiple of your override LRECL before you can use the LRECL override technique. Perhaps the easiest way to do this is by copying/reblocking the original dataset with an IEBGENER step, as follows (note, in a very many shops, a straightforward IEBGENER copy step (i.e. SYSIN is DUMMY) invokes the SORT product under the covers):

Code:
//STEP     EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=your.input.dataset,DISP=SHR
//SYSUT2   DD DSN=your.reblocked.dataset,UNIT=DISK,DISP=(,PASS),
//            DCB=(RECFM=FB,LRECL=newLRECL,BLKSIZE=n*newLRECL),
//            SPACE=(???)   
//SYSIN    DD DUMMY
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Mar 11, 2011 10:48 pm    Post subject:
Reply with quote

Thanks Ronald for your time.
I got the results and also got some concepts about BLKSIZE.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
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 How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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