Appendix K (Record Matching). DORIC 9.65, INFO-Text software
إعلان
إعلان
Appendix K
$CHECK-NOMATCH
Record Matching
This control variable allows users to change default processing with regard to tests on related file item values of blank, (for characters), and zero (for numerics).
Its scope covers tree-structured relates: when used in condition testing: and, when there is a 'nomatch' condition, whether to attempt a file position on a dependant related file, or to simply return 'nomatch' on this file as well.
$CHECK-NOMATCH IF or DO related file check:
Zero for numerics
Blank for characters
Pass/Fail test when
‘nomatch’
0
1 fail pass
2
3 fail pass
Tree Structured positioning:
Where ‘nomatch’ in parent attempt position in target file yes no no yes
INFO Reference Manual Appendices A-91
Record Matching
Appendix K
Examples - Matching on Tree-Related Files
EMPLOYEE
Name Emp-
Num
Joe
Sue
Sam
001
002
PREVIOUS-POSTS
Emp-Num Job
001
001
001
CL
LT
RM
002
002 TA
<no records for 000>
JOB-DESCRIPTION
Job
CL
JUG
KP
LT
RM
Job-Desc
Not Classified
Clown
Juggler
Kitchen Porter
Lion Tamer
Ring Master
A tree-related structure is set up in the following program using the above files and changing value of $CHECK-NOMATCH and its effects on matching are shown:
$CHECK-NOMATCH = #
SELECT EMPLOYEE
(where # = 0, 1, 2, or 3)
RELATE PREVIOUS-POSTS 1 BY EMP-NUM
RELATE JOB-DESCRIPTION 2 BY $1JOB
NEXT 1
A-92 Appendices INFO Reference Manual
Appendix K
Record Matching
Joe
Joe
Joe
Sue
Sue
Sam
$CHECK-NOMATCH = 0
DISPLAY NAME,$1JOB,$2JOB-DESC
CL
LT
Clown
Lion Tamer
RM Ring Master
Not Classified
TA
Not Classified
Joe
Joe
Joe
Sue
Sue
Sam
$CHECK-NOMATCH = 1
DISPLAY NAME,$1JOB,$2JOB-DESC
CL
LT
Clown
Lion Tamer
RM Ring Master
Not Classified
TA
Joe
Joe
Joe
Sue
Sue
Sam
$CHECK-NOMATCH = 2
DISPLAY NAME,$1JOB,$2JOB-DESC
CL Clown
LT Lion Tamer
RM Ring Master
Not Classified
TA
$CHECK-NOMATCH = 3
DISPLAY NAME,$1JOB,$2JOB-DESC
Joe
Joe
Joe
Sue
Sue
Sam
CL
LT
Clown
Lion Tamer
RM Ring Master
Not Classified
TA
Not Classified
INFO Reference Manual Appendices A-93
Record Matching
Appendix K
Examples - Condition Testing for a Match
The examples below use the same data to illustrate the effect of the new settings of $CHECK-NOMATCH on condition Testing:
First Related File
$CHECK-NOMATCH = #
(where # = 0, 1, 2 or 3)
SELECT EMPLOYEE
RELATE PREVIOUS-POSTS 1 BY EMP-NUM
RELATE JOB-DESCRIPTION 2 BY $1JOB
.
PROGRAM SECTION TWO
IF $1JOB = ' '
DISPLAY 'Nomatch = ',$CHECK-NOMATCH,NAME,$1JOB,$2JOB-DESC
ENDIF
NEXT 1
Nomatch = 0
Nomatch = 1
Nomatch = 1
Nomatch = 2
Nomatch = 3
Nomatch = 3
Sue
Sue
Sam
Sue
Sue
Sam
Not Classified
Not Classified
Not Classified
Not Classified
Not Classified
A-94 Appendices INFO Reference Manual
Appendix K
Record Matching
Second Related File
$CHECK-NOMATCH = #
SELECT EMPLOYEE
(where # = 0, 1, 2 or 3)
RELATE PREVIOUS-POSTS 1 BY EMP-NUM
RELATE JOB-DESCRIPTION 2 BY $1JOB
.
PROGRAM SECTION TWO
IF $2JOB = ' '
ENDIF
DISPLAY 'Nomatch = ',$CHECK-NOMATCH,NAME,$1JOB,$2JOB-DESC
NEXT 1
Nomatch = 0
Nomatch = 1
Nomatch = 1
Nomatch = 1
Nomatch = 2
Nomatch = 3
Nomatch = 3
Nomatch = 3
Sue
Sue
Sue
Sam
Sue
Sue
Sue
Sam
TA
TA
Not Classified
Not Classified
Not Classified
Not Classified
Not Classified
Compatibility with Earlier Revisions of INFO
To emulate pre-revision 9.6 processing as much as possible, $CHECK-NO-MATCH should be set to 3.
INFO Reference Manual Appendices A-95
تنزيل
إعلان