View previous topic :: View next topic
Author
Message
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Hi,
I am trying to sort a file into 2 sortouts, both having equal number of records with similar output. While doing so i got an edit message as stated below:
Code:
"WER247A SORTOF01 HAS INCOMPATIBLE LRECL"
Please find the control card used below:
Code:
INREC FIELDS=(1,29,31,2,34,125)
SORT FIELDS=(34,6,PD,D,
26,10,CH,D,
8,10,CH,A,
1,2,PD,D,
3,2,PD,D,
5,3,PD,D)
OUTFIL FILES=01,
INCLUDE=(26,8,CH,GT,DATE2-4)
OUTFIL FILES=02,
INCLUDE=(26,8,CH,GT,DATE2-4),
OUTREC=(1:1,29,30:C'-',31:30,2,33:C'-',34:32,125,159:15X)
Please help me solve this issue. Thank you very much
Regards,
Fazil
Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks...Anuj
Back to top
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Adding to the above issue, SORTOF01 and SORTOF02 have a record length of 173. My SORTIN file have a length of 174. Thank you.
Back to top
UmeySan Active Member Joined: 22 Aug 2006Posts: 771 Location: Germany
Hi !
Where is OUTREC specified for OUTFIL FILES=01 ???
Back to top
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Hi,
I used a separate outrec for the outfil 01. But got a duplicate outrec syntax message.
INREC FIELDS=(1,29,31,2,34,125)
SORT FIELDS=(34,6,PD,D, LRN
26,10,CH,D, DISCONNECT-DATE
8,10,CH,A, EFFECTIVE-DATE
1,2,PD,D, NPA
3,2,PD,D, NXX
5,3,PD,D) LINE NBR
OUTFIL FILES=01,
INCLUDE=(26,8,CH,GT,DATE2-4)
OUTREC=(1:1,29,30:C'-',31:30,2,33:C'-',34:32,125,159:15X)
OUTFIL FILES=02,START REC=1
INCLUDE=(26,8,CH,GT,DATE2-4)
OUTREC=(1:1,29,30:C'-',31:30,2,33:C'-',34:32,125,159:15X)
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER268A INCLUDE STATEMENT : SYNTAX ERROR
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER269A INCLUDE STATEMENT : DUPLICATE STATEMENT FOUND
WER269A OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
Back to top
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Hi,
Please do let me know what was wrong in the above control card. Is there any syntax issues? Thank you very much.
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8796 Location: Welsh Wales
Of course there are syntax issues, that is why the eroor message "SYNTAX ERROR" is being displayed.
Should not the INCLUDE statement end with a comma to continue onto the OUTREC statement ?
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
Hello,
I think you missed out some commas( , ) here.
Code:
OUTFIL FILES=01,
INCLUDE=(26,8,CH,GT,DATE2-4),
OUTREC=(1:1,29,30:C'-',31:30,2,33:C'-',34:32,125,159:15X)
OUTFIL FILES=02,
INCLUDE=(26,8,CH,GT,DATE2-4),
OUTREC=(1:1,29,30:C'-',31:30,2,33:C'-',34:32,125,159:15X)
But I dont understand why you coded a 'STARTREC=1'. AFAIK it should start from 1 by default. Again I dont see any difference between the INCLUDE conditions used for both the files.
If you explain what you're trying to do with relevant field positions, we'll be able to help.
Back to top
UmeySan Active Member Joined: 22 Aug 2006Posts: 771 Location: Germany
Hi !
No duplicate Outrec-Error. A normal Error cause you forgot a comma.
Syntax:
OUTFIL FILES=02, COMMA
INCLUDE=(55,1,CH,EQ,C'1'), COMMA
OUTREC=(53,01,47,06,01,03,X,11,26,X,29993,08,X,37,10,X,
Include & outrec belong to OUTFIL.
Nice weekend
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8796 Location: Welsh Wales
When asked about the incident of the incorrect syntax, the OP was reported to have responded "No comma"
Back to top
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Hi friends,
Thanks for your reply.
As said correctly, start rec is not required.
I am trying to sort a file into 2 ouput files both having similar and equal number of records. One sortin and 2 sortouts in the same step.
Can you please let me know whether a single include command will do for both the outfiles. Thanks a lot for the help.
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8796 Location: Welsh Wales
Are you trying to get two files with the same contents, or for the input file to be equally split between two outputs ?
Back to top
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Hi,
I am trying to get 2 sortout files with same content. I am using a common control card for both the sortout files. Thank you very much.
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
fazilbe,
You can do the same by modifying the card to something like this.
Code:
INREC FIELDS=(1,29,31,2,34,125)
SORT FIELDS=(34,6,PD,D, LRN
26,10,CH,D, DISCONNECT-DATE
8,10,CH,A, EFFECTIVE-DATE
1,2,PD,D, NPA
3,2,PD,D, NXX
5,3,PD,D) LINE NBR
OUTFIL INCLUDE=(26,8,CH,GT,DATE2-4),
OUTREC=(1:1,29,30:C'-',31:30,2,33:C'-',34:32,125,159:15X),
FILES=(01,02)
Back to top
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Hi,
I will try the above control card and let everybody know the outcome of it. Thank you very much.
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
fazilbe,
You're welcome. Goodluck.
Back to top
fazilbe New User Joined: 03 Dec 2008Posts: 25 Location: INDIA
Arun,
Control card provided by you worked without error messages. I was able to sort the file into 2 equal and similar sortouts. Thank you very much. Thank you everybody.
Regards,
Fazil
Back to top
Please enable JavaScript!