-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
22 changed files
with
415 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 32 additions & 63 deletions
95
TypeCobol.Test/Parser/CodeElements/SORT_ko.CodeElements.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
TypeCobol.Test/Parser/Programs/Cobol85/SortStatement.Mix.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. TCOMFL06. | ||
ENVIRONMENT DIVISION. | ||
INPUT-OUTPUT SECTION. | ||
FILE-CONTROL. | ||
Select Out001 Assign To SOR001. | ||
Select AmbiguousName Assign To SOR001. | ||
DATA DIVISION. | ||
FILE SECTION. | ||
SD Out001. | ||
01 Out001Data PIC X(200). | ||
SD AmbiguousName. | ||
01 AmbiguousNameData PIC X(200). | ||
WORKING-STORAGE SECTION. | ||
01 tab1. | ||
05 a OCCURS 20. | ||
10 item-a PIC X. | ||
01 AmbiguousName PIC X. | ||
PROCEDURE DIVISION. | ||
*KO unable to resolve SORT target | ||
Line 21[17,37] <27, Error, Syntax> - Syntax error : Unable to resolve reference to SORT target 'something-not-defined'. | ||
SORT something-not-defined | ||
*KO ambiguous reference | ||
Line 23[17,29] <27, Error, Syntax> - Syntax error : Ambiguous reference to SORT target 'AmbiguousName'. | ||
SORT AmbiguousName | ||
*KO SORT file without KEY | ||
Line 25[12,15] <27, Error, Syntax> - Syntax error : SORT file statement requires at least one sorting KEY. | ||
SORT Out001 INPUT PROCEDURE inputProc | ||
OUTPUT PROCEDURE outputProc | ||
*KO SORT file without input | ||
Line 28[12,15] <27, Error, Syntax> - Syntax error : Missing input definition in SORT file statement: either add INPUT PROCEDURE phrase or USING file phrase to define required input. | ||
SORT Out001 ASCENDING Out001Data | ||
OUTPUT PROCEDURE outputProc | ||
*KO SORT file without output | ||
Line 31[12,15] <27, Error, Syntax> - Syntax error : Missing output definition in SORT file statement: either add OUTPUT PROCEDURE phrase or GIVING file phrase to define required output. | ||
SORT Out001 ASCENDING Out001Data | ||
INPUT PROCEDURE inputProc | ||
*KO SORT table with input | ||
Line 34[12,15] <27, Error, Syntax> - Syntax error : SORT table statement does not allow input definition. | ||
SORT a ASCENDING item-a | ||
INPUT PROCEDURE inputProc | ||
*KO SORT table with output | ||
Line 37[12,15] <27, Error, Syntax> - Syntax error : SORT table statement does not allow output definition. | ||
SORT a ASCENDING item-a | ||
OUTPUT PROCEDURE outputProc | ||
*KO SORT table without KEY | ||
Line 40[12,15] <27, Error, Syntax> - Syntax error : SORT table statement has no sorting KEY and the sorted table 'a' does not define any KEY clause. | ||
SORT a | ||
*Ok, this is a valid SORT file | ||
SORT Out001 ASCENDING Out001Data | ||
INPUT PROCEDURE inputProc | ||
OUTPUT PROCEDURE outputProc | ||
*Ok, this is a valid SORT table | ||
SORT a ASCENDING item-a | ||
GOBACK | ||
. | ||
inputProc. | ||
DISPLAY "input proc" | ||
. | ||
outputProc. | ||
DISPLAY "output proc" | ||
. | ||
END PROGRAM TCOMFL06. |
55 changes: 55 additions & 0 deletions
55
TypeCobol.Test/Parser/Programs/Cobol85/SortStatement.rdz.cbl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. TCOMFL06. | ||
ENVIRONMENT DIVISION. | ||
INPUT-OUTPUT SECTION. | ||
FILE-CONTROL. | ||
Select Out001 Assign To SOR001. | ||
Select AmbiguousName Assign To SOR001. | ||
DATA DIVISION. | ||
FILE SECTION. | ||
SD Out001. | ||
01 Out001Data PIC X(200). | ||
SD AmbiguousName. | ||
01 AmbiguousNameData PIC X(200). | ||
WORKING-STORAGE SECTION. | ||
01 tab1. | ||
05 a OCCURS 20. | ||
10 item-a PIC X. | ||
01 AmbiguousName PIC X. | ||
PROCEDURE DIVISION. | ||
*KO unable to resolve SORT target | ||
SORT something-not-defined | ||
*KO ambiguous reference | ||
SORT AmbiguousName | ||
*KO SORT file without KEY | ||
SORT Out001 INPUT PROCEDURE inputProc | ||
OUTPUT PROCEDURE outputProc | ||
*KO SORT file without input | ||
SORT Out001 ASCENDING Out001Data | ||
OUTPUT PROCEDURE outputProc | ||
*KO SORT file without output | ||
SORT Out001 ASCENDING Out001Data | ||
INPUT PROCEDURE inputProc | ||
*KO SORT table with input | ||
SORT a ASCENDING item-a | ||
INPUT PROCEDURE inputProc | ||
*KO SORT table with output | ||
SORT a ASCENDING item-a | ||
OUTPUT PROCEDURE outputProc | ||
*KO SORT table without KEY | ||
SORT a | ||
*Ok, this is a valid SORT file | ||
SORT Out001 ASCENDING Out001Data | ||
INPUT PROCEDURE inputProc | ||
OUTPUT PROCEDURE outputProc | ||
*Ok, this is a valid SORT table | ||
SORT a ASCENDING item-a | ||
GOBACK | ||
. | ||
inputProc. | ||
DISPLAY "input proc" | ||
. | ||
outputProc. | ||
DISPLAY "output proc" | ||
. | ||
END PROGRAM TCOMFL06. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.