View previous topic :: View next topic
|
Author |
Message |
nitinkhobragade1
New User
Joined: 07 Mar 2006 Posts: 16
|
|
|
|
I am running the below job which counts the number of records present in the input file and puts it in the output file.
Code: |
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=TEST.INPUT1,DISP=SHR
//SORTOUT DD DSN=TEST.OUTPUT5,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(35,5),RLSE),
// DCB=(RECFM=FB,LRECL=40,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,NODETAIL,
TRAILER1=('NO OF RECORDS: ',COUNT)
/*
|
It works well when both the input and output files are of same length.
But when I increase the length of the output file to 90(say for example input file LREC=40)
It gives the following error
SORTIN : RECFM=FB ; LRECL= 40; BLKSIZE= 400
SORTOUT : RECFM=FB ; LRECL= 90; BLKSIZE= 27990
SORTOUT HAS INCOMPATIBLE LRECL
CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN
SYNCSMF CALLED BY SYNCSORT;
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
My requirement is that the output file should be of lrecl 90 bytes whereas the input file is of lrecl 40 bytes.
Please suggest what can be done. |
|
Back to top |
|
|
nitinkhobragade1
New User
Joined: 07 Mar 2006 Posts: 16
|
|
|
|
my output file format is:
'Total number of records in input file is :' count . |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
nitinkhobragade1 wrote: |
SORTIN : RECFM=FB ; LRECL= 40; BLKSIZE= 400
SORTOUT : RECFM=FB ; LRECL= 90; BLKSIZE= 27990
SORTOUT HAS INCOMPATIBLE LRECL
CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN
SYNCSMF CALLED BY SYNCSORT;
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
Just for the heck of it, please include the "WER" message numbers associated with the messages. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You need to read the fine manual to see how to reformat records. |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi
Give the Record format as FRECFM=FBA and try.
Sai |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi
Sorry RECFM=FBA
Sai |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
Give the Record format as FRECFM=FBA and try. |
Please explain the reason behind this suggestion ? |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi Expat,
If i give RECFM= FB , I got the following error
SORTIN : RECFM=FB ; LRECL= 220; BLKSIZE= 27940
SORTOUT RECFM INCOMPATIBLE WITH REPORT WRITING
SORTOUT : RECFM=FB ; LRECL= 90; BLKSIZE= 27990
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
SORTOUT RECFM INCOMPATIBLE WITH REPORT WRITING
since the error is related to the report writing the record format should be FBA.
Correct me if i am wrong
Sai |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, so where in the post is there a mention of writing a report ? Nowhere that I can see.
To me, the problem is that the OP is reading a 40 byte record as input and is attempting to create a 90 byte record as output with no attempt at reformatting the record accordingly. i.e. specifying what is to go into the additional 50 bytes.
I use DFSORT and if you want to change the LRECL you need to specify other things, like what to put in the extra bytes. I do not think this has anything to do with writing a report, otherwise the OP may have mentioned this.
I would guess that your SORTOUT DD statement referred to a SYSOUT= to get the error message that you received whereas the OP is writing to a dataset. Completely different outputs. |
|
Back to top |
|
|
nitinkhobragade1
New User
Joined: 07 Mar 2006 Posts: 16
|
|
|
|
I have already tried with the RECFM=FBA but still I am getting the same error .It did not solve the issue. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
in DFSORT I would use something like ....
Code: |
OUTFIL OUTREC=(1,40,50:X) |
To fill the extra 50 bytes of the extended record length.
I do not know the SYNCSORT equivilent, so can not tell you what it is. |
|
Back to top |
|
|
nitinkhobragade1
New User
Joined: 07 Mar 2006 Posts: 16
|
|
|
|
William Thompson wrote:
Just for the heck of it, please include the "WER" message numbers associated with the messages.
The WER message numbers are:
WER108I SORTIN : RECFM=FB ; LRECL= 40; BLKSIZE= 400
WER110I SORTOUT : RECFM=FBA ; LRECL= 90; BLKSIZE= 27990
WER247A SORTOUT HAS INCOMPATIBLE LRECL
WER425A CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
expat wrote: |
in DFSORT I would use something like ....
Code: |
OUTFIL OUTREC=(1,40,50:X) |
To fill the extra 50 bytes of the extended record length.
I do not know the SYNCSORT equivilent, so can not tell you what it is. |
If I see it correctly, more like this:
Code: |
OUTFIL OUTREC=(1,40,50X) |
|
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
hi nitinkhobragade1 ,
Try to give the following sort card and check, it worked fine for me
//STEP01 EXEC PGM=SORT
//SORTIN DD DSN=.... //* Input file
//SORTOUT DD DSN=Output file name,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=90,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,REMOVECC,NODETAIL,
TRAILER1=('NO OF RECORDS :',COUNT)
/*
For me If i am not giving REMOVECC then i have to code the RECFM as FBA else the RECFM=FB.
REMOVECC simplifies the removal of printer controls when output is to be displayed online or written to a list data set rather than a printout.
When REMOVECC is used, the LRECL does not require an extra byte for the carriage control character.
Sai |
|
Back to top |
|
|
|