Peter Farley wrote on 03/11/2010 07:35:02 AM:
> I have several short LRECL=45 DSN's to be sorted and I need to add one
> or two records by hand as DD * input. I tried the following, but SORT
> got a "wrong length record" error on SORTIN when I did:
>
> //SORTIN DD DISP=SHR,DSN=TSOUSER.LRECL45.FILE1
> // DD DISP=SHR,DSN=TSOUSER.LRECL45.FILE2
> // DD *,LRECL=45,BLKSIZE=45
> ADDITIONAL RECORD DATA
> //*
>
> IER061A I/O ERR TSOUSERU,SORTDATA,JES ,I,SORTIN ,READ ,WRONG LEN
> RECRD
>
> TIA for pointing out whatever my error may be, or if there is some other
> method I should be using to add the one or two additional records. I
> know I can just create a one-record file of the same LRECL, but it just
> seems like overkill to me when DD * should "just work" here, shouldn't
> it?
Hmmm. The only way I could get this to work with DFSORT was to use
LRECL=45 input files created with RECFM=F and BLKSIZE=45, so they would
match the attributes of the DD *, LRECL=45,BLKSIZE=45 statement
(which I assume is given RECFM=F by default). RECFM=FB for the
input data sets gave me a system ICE020I 001-1 error.
RECFM=FB on the DD * statement gave me a JCL error.
So it appears creating the input data sets with
RECFM=F is the only way to get the system to let this work.
I couldn't get this to work with DFSORT no matter what I did.
The WER061A message indicates you're using Syncsort, not DFSORT, but I
think they would both get the same result.
How about using TRAILER1 to add the additional records at the end of the
output file:
//SORTIN DD DISP=SHR,DSN=TSOUSER.LRECL45.FILE1
// DD DISP=SHR,DSN=TSOUSER.LRECL45.FILE2
...
//SYSIN DD *
...
OUTFIL REMOVECC,
TRAILER1=('ADDITIONAL RECORD 1 DATA',/,
'ADDITIONAL RECORD 2 DATA')
Frank Yaeger - DFSORT Development Team (IBM) - [email protected]
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html