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

Need help for the sortcard using outrec and header2


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 10:41 am
Reply with quote

I am using the following sort card. Input file has length 40 and output has length 50.

Code:
SORT FIELDS=(37,4,ZD,A)                             
  SUM FIELDS=(1,4,5,8),FORMAT=PD                     
  OUTFIL LINES=80                                     
    OUTREC=(01:37,04,ZD,EDIT=(IIIT),                 
         11:01,04,PD,EDIT=(IIIIIIT),                 
         20:05,08,PD,EDIT=(IIIIIIIIIIIII.TT)),       
  HEADER2=(//////////,                               
          2:'DEPOSIT SYSTEM 67 1099 LTC TOTALS',     
          44:&DATE,//,                               
          01:'SYSTEM #',                             
          11:'TOTAL RECS',                           
          20:'GROSS BENEFIT PAID'/)                   


I am getting the following error again and again. I have tried all possible options. Please help !!


Code:
WER108I  SORTIN   : RECFM=FB   ; LRECL=    40; BLKSIZE= 23440   
WER073I  SORTIN   : DSNAME=FLDXPED.SUM2K12.DEP67.LTC1099.DATA   
WER110I  SORTOUT  : RECFM=FBA  ; LRECL=    50; BLKSIZE= 23450   
WER074I  SORTOUT  : DSNAME=FLDXPED.SUM2K12.DEP67.INFOPAC.RPT   
WER247A  SORTOUT  HAS INCOMPATIBLE LRECL                       
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon May 28, 2012 10:49 am
Reply with quote

other than this is a syncsort rather than DFSORT,

RECFM=FBA ; LRECL= 50
which means you really only have 49 char

dfsort has a NOCC which changes the FBA to FB,
maybe syncsort has the same.

also, what is your dcb for sortout?
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 10:56 am
Reply with quote

This is the JCL step :

Code:
//CTAX6704 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD DSN=FLDXPED.SUM2K12.DEP67.LTC1099.DATA, 
//            DISP=SHR                                 
//SORTOUT  DD DSN=FLDXPED.SUM2K12.DEP67.INFOPAC.RPT,   
//            DISP=(NEW,CATLG,DELETE),                 
//            SPACE=(CYL,(10,20),RLSE),               
//            DCB=LNL1.U3380.FBA50                     
//SORTWK01 DD UNIT=PRDWRK,                             
//            SPACE=(CYL,(10,5))                       
//SORTWK02 DD UNIT=PRDWRK,                             
//            SPACE=(CYL,(10,5))                       
//SORTWK03 DD UNIT=PRDWRK,                             
//            SPACE=(CYL,(10,5))                       
//SORTWK04 DD UNIT=PRDWRK,                             
//            SPACE=(CYL,(10,5))                       
//SYSIN    DD DSN=C5LSHS.TEST.SHIKHA.COB(DS67L2),     
//            DISP=SHR
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 11:22 am
Reply with quote

I have used FBA for the outrec. Is that causing an issue ? If I use FB, I get the error : RECFM INCOMPATIBLE WITH REPORT WRITING along with the original LRECL error.
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 11:27 am
Reply with quote

This is the explanation for the error message which I am getting when I do a QW. But I am not getting any help out of it icon_sad.gif

Quote:
WER247A 'DDNAME' HAS INCOMPATIBLE LRECL
EXPLANATION: The 'ddname' will be SORTOUT,
SORTOFxx or SORTOFxx. There is a conflict be-
tween the LRECL specification for the indicated
output file and either the post-OUTFIL or
post-OUTREC record length. Padding of records
is not permitted after OUTFIL processing, so
the LRECL may not be greater than the
post-OUTFIL record length. Alternately, trun-
cation of records is not permitted after the
OUTREC statement or the OUTFIL OUTREC process-
ing, so the LRECL may not be less than the
post-OUTREC record length.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Mon May 28, 2012 11:36 am
Reply with quote

When you add up the output bytes in your control cards waht does the total come to for a line? I can't do it as you have not encoded your data so spaces may be missing.

And what is that coded in the DCB parameter. If SYNCSORT is like DFSORT it will calculate the parameters for you nd therefor give you the correct ones.
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 11:46 am
Reply with quote

Date is starting from 44th position and it is in the format 01/03/12
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 11:47 am
Reply with quote

even if I use output rec length of 133, I am getting same error
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Mon May 28, 2012 3:14 pm
Reply with quote

Hi,

I did few changes in your code. Pls try below code and let us know...

Given LRECL=80.

Code:

 SORT FIELDS=(37,4,ZD,A)
 SUM FIELDS=(1,4,5,8),FORMAT=PD
 OUTFIL REMOVECC,OUTREC=(01:37,04,ZD,EDIT=(IIIT),
 11:01,04,PD,EDIT=(IIIIIIT),
 20:05,08,PD,EDIT=(IIIIIIIIIIIII.TT),53X),
 HEADER2=(//////////,
 2:'DEPOSIT SYSTEM 67 1099 LTC TOTALS',
 44:&DATE,//,
 01:'SYSTEM #',
 11:'TOTAL RECS',
 21:'GROSS BENEFIT PAID'/)
 


Thanks
-3nadh
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 3:33 pm
Reply with quote

Used the following sortout

Code:
//SORTOUT  DD DSN=FLDXPED.SUM2K12.DEP67.INFOPAC.RPT, 
//            DISP=(NEW,CATLG,DELETE),               
//            SPACE=(CYL,(10,20),RLSE),               
//            DCB=LNL1.U3380.FBA80                   


and following sort card as per your suggestion. Still the same error icon_sad.gif

Code:
SORT FIELDS=(37,4,ZD,A)                               
 SUM FIELDS=(1,4,5,8),FORMAT=PD                       
 OUTFIL REMOVECC,                                     
   OUTREC=(01:37,04,ZD,EDIT=(IIIT),                   
        11:01,04,PD,EDIT=(IIIIIIT),                   
        20:05,08,PD,EDIT=(IIIIIIIIIIIII.TT),53X),     
 HEADER2=(//////////,                                 
         2:'DEPOSIT SYSTEM 67 1099 LTC TOTALS',       
         44:&DATE,//,                                 
         01:'SYSTEM #',                               
         11:'TOTAL RECS',                             
         21:'GROSS BENEFIT PAID'/)
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Mon May 28, 2012 4:03 pm
Reply with quote

Using copybook, can you show me your Input file in File-Aid!


Thanks
-3nadh
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 4:17 pm
Reply with quote

The input file is a result of another sort step. So, I do not have any copybook for it. The previous sort which was applied was :

Code:
SORT FIELDS=(1,1,CH,A)               
OUTFIL FILES=1,                       
  INCLUDE=(1,1,CH,EQ,C'L',AND,       
           1090,4,ZD,EQ,67),         
  OUTREC=(1:X'0000001C',             
          5:X'0000',                 
          7:1568,14,ZD,TO=PD,LENGTH=6,
         13:X'00',                   
         37:1090,4)     


after this sort, the file looks likes this and is the input for the current sort.

Code:

.............                       0067                                       
.............                       0067                                       
.............                       0067                                       
.........&...                      0067
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Mon May 28, 2012 5:39 pm
Reply with quote

Don't you think that it might be more worthwhile posting your output with hex on and using the code tags? And the copybook for the file when it was originally created may help those trying to analyse your request. Also, generally I think, if you provide DCB info then it over-rides what sort thinks it needs so did you try without any DCB info as suggested before?

If you are not prepared to try the suggestions why should we bother making the suggestions?
Back to top
View user's profile Send private message
shikhasharma

New User


Joined: 16 Jan 2007
Posts: 11
Location: gurgaon

PostPosted: Mon May 28, 2012 7:04 pm
Reply with quote

Tried without dcb and it worked
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Mon May 28, 2012 8:23 pm
Reply with quote

did You notice that Your posts were edited to provide the code tabs for better readability?

looks like not... icon_evil.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Mon May 28, 2012 9:54 pm
Reply with quote

Well, blimey! I've never used SYNCSORT and the DCB thing was just a wild guess from reading every post that comes along. Wheee! Makes up for a bad weekend!
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
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
Search our Forums:

Back to Top