Page 1 of 1

Syncsort: Problem in creating 2 output files

PostPosted: Thu Oct 18, 2007 10:54 pm
by engrpedro
People-

Anyone please help me in my problem. I have to create 2 files out of 1 input file using Syncsort. Output 1 needs to select a certain range in column 1 of input, using same layout. Output 2 needs to include some data and at the same time, reformat it to a different layout. Here is my sortcard:

OUTFIL FILES=01,
INCLUDE=(01,07,CH,GE,C'9306100',AND,
01,07,CH,LE,C'9306299')
OUTFIL FILES=02,
INCLUDE=(01,04,CH,EQ,C'9306')
OUTREC FIELDS=(01:14,03,
04:12,02,
06:09,03,
09:01,07,
16:17,09,
25:28,20)

When I ran this, it is giving me this error. Anyone, please please help me.

WER276B SYSDIAG= 3748823, 9266405, 9266405, 3118437
WER164B 1,028K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 20K BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER267A SORT STATEMENT : STATEMENT NOT FOUND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000

Re: Syncsort: Problem in creating 2 output files

PostPosted: Fri Oct 19, 2007 12:24 am
by MrSpock
First of all, this is a SYNCSORT problem, not a DFSORT problem.

Looks to me like you're missing a comma and are using the wrong parameter:

  OUTFIL FILES=01,
    INCLUDE=(01,07,CH,GE,C'9306100',AND,
      01,07,CH,LE,C'9306299')
  OUTFIL FILES=02,
    INCLUDE=(01,04,CH,EQ,C'9306'),
    OUTREC=(01:14,03,
      04:12,02,
      06:09,03,
      09:01,07,
      16:17,09,
      25:28,20)

Re: Syncsort: Problem in creating 2 output files

PostPosted: Mon Oct 22, 2007 3:23 pm
by krisprems
Try this SORT JOB,
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(01,07,CH,GE,C'9306100',AND,
01,07,CH,LE,C'9306299')
OUTFIL FILES=02,
INCLUDE=(01,04,CH,EQ,C'9306'),
OUTREC FIELDS=(01:14,03,
04:12,02,
06:09,03,
09:01,07,
16:17,09,
25:28,20)


As this error message states
WER267A SORT STATEMENT : STATEMENT NOT FOUND
you did not include the SORT FIELDS=....

Re: Syncsort: Problem in creating 2 output files

PostPosted: Mon Oct 22, 2007 8:38 pm
by engrpedro
Ok-

I tried this,

SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(01,07,CH,GE,C'9306100',AND,
01,07,CH,LE,C'9306299')
OUTFIL FILES=02,
INCLUDE=(01,04,CH,EQ,C'9306'),
OUTREC=(01:14,03,
04:12,02,
06:09,03,
09:01,07,
16:17,09,
25:28,20)


And I got this new error message

WER247A SORTOF02 HAS INCOMPATIBLE LRECL

I suspect the reason is that my SORTOF01 LRECL is 154 and my SORTOF02 is 80. Is there any more wokaround on this?

Re: Syncsort: Problem in creating 2 output files

PostPosted: Mon Oct 22, 2007 11:41 pm
by William Thompson
engrpedro wrote:WER247A SORTOF02 HAS INCOMPATIBLE LRECL
I suspect the reason is that my SORTOF01 LRECL is 154 and my SORTOF02 is 80. Is there any more wokaround on this?

I do recall that you need to account for all the characters in the OUTREC - you only have specified about 45 for 02......

Re: Syncsort: Problem in creating 2 output files

PostPosted: Tue Oct 23, 2007 11:45 am
by krisprems
engrpedro
Change your OUTREC statement to
OUTREC=(01:14,03,
04:12,02,
06:09,03,
09:01,07,
16:17,09,
25:28,20,
LRECL:X)

and replace LRECL with the LRECL of your O/P file.

Re: Syncsort: Problem in creating 2 output files

PostPosted: Tue Mar 04, 2008 3:29 am
by Alissa Margulies
engrpedro wrote:WER247A SORTOF02 HAS INCOMPATIBLE LRECL
I suspect the reason is that my SORTOF01 LRECL is 154 and my SORTOF02 is 80. Is there any more wokaround on this?

You can either pad the output in OUTREC by coding
OUTREC=(01:14,03,
04:12,02,
06:09,03,
09:01,07,
16:17,09,
25:28,20,
80:X)
as krisprems suggested, or you can simply modify the JCL to specify the correct LRECL on the SORTOF02 DD statement (LRECL=44).