I just want to add some comments and present in a very structured way so it’s very easy for someone to follow in future, there I am facing problem.
Code:
SORT FIELDS=COPY
OUTFIL FNAMES=SORTPLO,INCLUDE=(
* MODEL 1.
(23,1,CH,EQ,C'X',AND,
(24,1,CH,EQ,C'F',OR,24,1,CH,EQ,C'L',OR,24,1,CH,EQ,C'S'),AND,
(35,1,CH,EQ,C'C',OR,35,1,CH,EQ,C'D',OR,
35,1,CH,EQ,C'E',OR,35,1,CH,EQ,C'F',OR,
35,1,CH,EQ,C'G',OR,35,1,CH,EQ,C'H')),OR,
* MODEL 2.
(23,1,CH,EQ,C'R',AND,
(24,1,CH,EQ,C'A',OR,24,1,CH,EQ,C'B'),AND,
(35,1,CH,EQ,C'W',OR,35,1,CH,EQ,C'X',OR,
35,1,CH,EQ,C'Y',OR,35,1,CH,EQ,C'Z')),OR,
* MODEL 3.
((23,1,CH,EQ,C'B',AND,24,1,CH,EQ,C'A'),AND,
(35,1,CH,EQ,C'I',OR,35,1,CH,EQ,C'J'))
* END.
)
OUTFIL FNAMES=SORTREST,SAVE
It considers every statement as comment as below
Code:
SYSIN :
SORT FIELDS=COPY
OUTFIL FNAMES=SORTPLO,INCLUDE=(
*
* MODEL 1. *
(23,1,CH,EQ,C'X',AND,
*
(24,1,CH,EQ,C'F',OR,24,1,CH,EQ,C'L',OR,24,1,CH,EQ,C'S'),AND,
*
(35,1,CH,EQ,C'C',OR,35,1,CH,EQ,C'D',OR,
*
35,1,CH,EQ,C'E',OR,35,1,CH,EQ,C'F',OR,
*
35,1,CH,EQ,C'G',OR,35,1,CH,EQ,C'H')),OR,
*
* MODEL 2. *
(23,1,CH,EQ,C'R',AND,
*
(24,1,CH,EQ,C'A',OR,24,1,CH,EQ,C'B'),AND,
*
(35,1,CH,EQ,C'W',OR,35,1,CH,EQ,C'X',OR,
*
35,1,CH,EQ,C'Y',OR,35,1,CH,EQ,C'Z')),OR,
*
* MODEL 3. *
((23,1,CH,EQ,C'B',AND,24,1,CH,EQ,C'A'),AND,
*
(35,1,CH,EQ,C'I',OR,35,1,CH,EQ,C'J'))
*
* END. *
)
*
OUTFIL FNAMES=SORTREST,SAVE
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
Regards
Rajiv R
Coded. Is the problem now obvious?
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
you haven't 'coded' your controls cards so we can't see where the individual control cards actually start.... other than the comment lines, do they start in col 2 ??
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
No, that's not the coded format - see the buttons above where you're typing - one is "Code" (about centre) . Use that before and after the control statements. Then we'll be able to properly see what you're using.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
I don't have Syncsort, but I guess your problem is not even the comment lines. I am afraid the way it is written is going to fail even without the comment lines you inserted, because of your first INCLUDE=(.. and nothing coded after that. Similarly your last closing brackets by itself in a single line could be another problem. You should terminate your control statements after a comma and then continue on the next line.
Alternatively you can also add comments by leaving one or more blanks after the last parameter or comma
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
Sergeyken - it appears to me the topic starter did RTFM. We do not know if it was read it correctly AND the manual was quoted correctly. But I think the real issue is comments can appear only between statements (or between the beginning of the data set and the first statement or (I'm guessing) between the last statement and the end of the data set). Anything else should be discussed with Syncsort support rather than this forum to either correct the product or (more likely) correct the manual.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Hi Steve,
I think (though I cannot test this), the manual has stated it correctly that the comment lines can be inserted by coding an asterisk(*) in column-1. The OP has used bad continuation, by stopping after the opening brackets where it can only be done after a parameter-comma or parameter-colon combination before column 72 (as per the MFX manual).
The manual also states that a comment can be added by leaving one or more blanks after the last parameter or comma, and follow with the comment which can be extended through column 71.
Sergeyken - it appears to me the topic starter did RTFM. We do not know if it was read it correctly AND the manual was quoted correctly. But I think the real issue is comments can appear only between statements (or between the beginning of the data set and the first statement or (I'm guessing) between the last statement and the end of the data set). Anything else should be discussed with Syncsort support rather than this forum to either correct the product or (more likely) correct the manual.
The real issue is extremely trivial: any SORT statement line, in order to be continued, must be truncated at any comma. NOT AT ANY OTHER CHARACTER.
There are thousands of typical examples in any of SORT manuals. That's why I suggested RTFM before appealing to the forum.
SORT comment lines can be inserted between ANY OF CORRECTLY CODED STATEMENT LINES, either they are continuations or not.
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
Going nowhere useful for the topic starter (TS) as s/he is obviously not listening.
Locked.
TS can pm me if s/he wants this unlocked so that s/he can give their thanks.