Page 1 of 1

Address Validation

Posted: Tue Jun 12, 2018 4:01 am
by satheesh_color
Hi All,

I am validating address for ine1 and Line2 and using custom ruleset. Below values has been set in .PAT file

\PRAGMA_START
SEPLIST " ~"
STRIPLIST " `!@#$%^*()_+={}[]|\\;\"<>?"
\PRAGMA_END

When i try to get the below value for Line1
Source: BLDG: CCA6, CUBE 6.7.270

But after doing standardization
Target
Line1= BLDG: CCA6
Line2= CUBE 6.7.270

But, i would like to have both the values in Line1 column.

Kindly let me know your thoughts on the same.

Regards,
Satheesh

Posted: Tue Jun 12, 2018 9:20 pm
by ray.wurlod
You'll need to show us how Line1 and Line2 are populated in your PAT file. It's very difficult to guess.

Posted: Wed Jun 13, 2018 12:45 am
by satheesh_color
Hi Ray,

;;QualityStage v8.0
;-------------------------------------------------------------------------------
; Pattern-Action File
;-------------------------------------------------------------------------------

;-------------------------------------------------------------------------------
; Parser Rules
;-------------------------------------------------------------------------------

\PRAGMA_START
SEPLIST " ~"
STRIPLIST " `!@#$%^*()_+={}[]|\\;\"<>?"
\PRAGMA_END

;-------------------------------------------------------------------------------
; Phonetic Codes
;-------------------------------------------------------------------------------

\POST_START
\POST_END

;-------------------------------------------------------------------------------
; Variable Listing
;-------------------------------------------------------------------------------
; Note: The following variable names are already in use in this pattern-action
; file. To avoid possible conflicts, do not re-use these variable names.
;-------------------------------------------------------------------------------
;
; Required_Step
;
;-------------------------------------------------------------------------------
; Initialization
;-------------------------------------------------------------------------------
; Note: Only necessary for variables and dictionary fields
; that require a non-blank initial value.
;-------------------------------------------------------------------------------

& ; Initialization
COPY "TRUE" Required_Step
COPY "NO" {UserOverrideFlag}

;-------------------------------------------------------------------------------
; MAIN Pattern-Action Sets Start Here
;-------------------------------------------------------------------------------

;-------------------------------------------------
; Determine Input Pattern
;-------------------------------------------------

& ; Determine Input Pattern {InputPattern}
PATTERN {InputPattern}

;-------------------------------------------------
; Input Overrides
;-------------------------------------------------

& ; CALL Input_Overrides SUBROUTINE
CALL Input_Overrides

;-------------------------------------------------
; Input Modifications
;-------------------------------------------------

& ; CALL Input_Modifications SUBROUTINE
CALL Input_Modifications

;-------------------------------------------------
; Abbreviations
;-------------------------------------------------
; This subroutine handles the A classifications by
; retyping the initial value to the standard value
; then reclassifying it to a +, giving the ability
; to correct misspellings of words that would not
; otherwise be classified.
;-------------------------------------------------

*A ; CALL Abbreviations SUBROUTINE
CALL Abbreviations

;-------------------------------------------------
; Common Patterns
;-------------------------------------------------
; This subroutine is intended to hold the most
; common patterns found in the data to process
; them quickly. By doing so, it minimizes the time
; it takes the ruleset to handle all the input.
; Each pattern-action set should match to the en-
; tire input then call the Post_Process SUBROUTINE
; and EXIT.
; An example from the USADDR ruleset:
; ^ | + | T | $
; COPY [1] {HouseNumber}
; COPY [2] {StreetName}
; COPY_A [3] {StreetType}
; CALL Post_Process
; EXIT
;-------------------------------------------------

& ; CALL Common_Patterns SUBROUTINE
CALL Common_Patterns

;*************************************************
;*************************************************

; INSERT ADDITIONAL PROCESSING HERE

;*************************************************
;*************************************************

;-------------------------------------------------
; Unhandled Overrides
;-------------------------------------------------

& ; CALL Unhandled_Overrides SUBROUTINE
CALL Unhandled_Overrides

;-------------------------------------------------
; Unhandled Modifications
;-------------------------------------------------

& ; CALL Unhandled_Modifications SUBROUTINE
CALL Unhandled_Modifications

;-------------------------------------------------
; Determine Unhandled Data and Unhandled Pattern
;-------------------------------------------------

** ; Determine Unhandled Data and Unhandled Pattern
COPY_S [1] {UnhandledData}
PATTERN {UnhandledPattern}

;-------------------------------------------------
; Call Post Process before exiting
;-------------------------------------------------

[ Required_Step = "TRUE" ] ; CALL Post_Process SUBROUTINE then EXIT
CALL Post_Process
EXIT

;-------------------------------------------------------------------------------
; SUBROUTINES Start Here
;-------------------------------------------------------------------------------
; (1) Input_Modifications
; (2) Unhandled_Modifications
; (3) Common_Patterns
; (4) Post_Process
;-------------------------------------------------------------------------------

;-------------------------------------------------------------------------------
; Input_Modifications SUBROUTINE Starts Here
;-------------------------------------------------------------------------------

\SUB Input_Modifications

& ; No patterns matched in the Input_Modifications SUBROUTINE
RETURN

\END_SUB

;-------------------------------------------------------------------------------
; Unhandled_Modifications SUBROUTINE Starts Here
;-------------------------------------------------------------------------------

\SUB Unhandled_Modifications

& ; No patterns matched in the Unhandled_Modifications SUBROUTINE
RETURN

\END_SUB

;-------------------------------------------------------------------------------
; Common_Patterns SUBROUTINE Starts Here
;-------------------------------------------------------------------------------

\SUB Common_Patterns

& ; No patterns matched in the Common_Patterns SUBROUTINE
RETURN

\END_SUB

;-------------------------------------------------------------------------------
; Post_Process SUBROUTINE Starts Here
;-------------------------------------------------------------------------------

\SUB Post_Process

& ; No patterns matched in the Post_Process SUBROUTINE
RETURN

\END_SUB

;-------------------------------------------------------------------------------
; STANDARD SUBROUTINES Start Here
;-------------------------------------------------------------------------------
; The STANDARD SUBROUTINES are:
; (1) Input_Overrides
; (2) Abbreviations
; (3) Unhandled_Overrides
;-------------------------------------------------------------------------------

;-------------------------------------------------
; Input_Overrides SUBROUTINE Starts Here
;-------------------------------------------------

\SUB Input_Overrides

;-------------------------------------------------
; Standardization Rules Designer Input
;-------------------------------------------------

&
PROCESS_RC Input_Overrides RC_Return

[ RC_Return = "1" ] ; A Standardization Rules Designer Input Override was found: CALL Post_Process SUBROUTINE then EXIT
COPY "CI" {UserOverrideFlag}
CALL Post_Process
EXIT

;-----------------------------
; Input Text Overrides
;-----------------------------

** ; Check for Input Text Overrides
COPY_S [1] Text
OVERRIDE_D Text @AdrValidate.ITO Return VALUE

[ Return = "1" ] ; An Input Text Override was found: CALL Post_Process SUBROUTINE then EXIT
COPY "IT" {UserOverrideFlag}
CALL Post_Process
EXIT

;-----------------------------
; Input Pattern Overrides
;-----------------------------
; Note: The Input Pattern Overrides section may be removed if the Standardization Rules Designer is used exclusively.

& ; Check for Input Pattern Overrides
PATTERN Pattern
OVERRIDE_D Pattern @AdrValidate.IPO Return CLASS

[ Return = "1" ] ; An Input Pattern Override was found: CALL Post_Process SUBROUTINE then EXIT
COPY "IP" {UserOverrideFlag}
CALL Post_Process
EXIT

\END_SUB

;-------------------------------------------------------------------------------
; Abbreviations SUBROUTINE Starts Here
;-------------------------------------------------------------------------------

\SUB Abbreviations

*A
COPY_A [1] temp
RETYPE [1] ? temp temp
REPEAT

\END_SUB

;-------------------------------------------------
; Unhandled_Overrides SUBROUTINE Starts Here
;-------------------------------------------------

\SUB Unhandled_Overrides

;-------------------------------------------------
; Standardization Rules Designer Unhandled
;-------------------------------------------------

&
PROCESS_RC Unhandled_Overrides RC_Return

[ RC_Return = "1" ] ; A Standardization Rules Designer Unhandled Override was found: CALL Post_Process SUBROUTINE then EXIT
COPY "CU" {UserOverrideFlag}
CALL Post_Process
EXIT

;-----------------------------
; Unhandled Text Overrides
;-----------------------------
; Note: The Unhandled Text Overrides section may be removed if the Standardization Rules Designer is used exclusively.

** ; Check for Unhandled Text Overrides
COPY_S [1] Text
OVERRIDE_D Text @AdrValidate.UTO Return VALUE

[ Return = "1" ] ; An Unhandled Text Override was found: CALL Post_Process SUBROUTINE then EXIT
COPY "UT" {UserOverrideFlag}
CALL Post_Process
EXIT

;-----------------------------
; Unhandled Pattern Overrides
;-----------------------------
; Note: The Unhandled Pattern Overrides section may be removed if the Standardization Rules Designer is used exclusively.

& ; Check for Unhandled Pattern Overrides
PATTERN Pattern
OVERRIDE_D Pattern @AdrValidate.UPO Return CLASS

[ Return = "1" ] ; An Unhandled Pattern Override was found: Post_Process SUBROUTINE then EXIT
COPY "UP" {UserOverrideFlag}
CALL Post_Process
EXIT

\END_SUB

Posted: Sat Jun 16, 2018 6:30 pm
by ray.wurlod
I don't see any code in there that populates Line1 or Line2.