****************************************************************
* * ADDRSCAN CALL-AREA * *
* **************************************** *
* NOTE: THE INITIAL VALUE OF ADDRPASS-ANCHOR WILL BE IGNORED *
* BY THE COMPILER IF THIS IS IN THE FILE SECTION OR *
* LINKAGE SECTION. IN THAT CASE, MOVE SPACES TO *
* ADDRPASS-ANCHOR BEFORE THE FIRST BATCH ADDRSCAN *
* CALL BUT NOT ON SUBSEQUENT CALLS. IN CICS, THE VALUE *
* DOES NOT NEED TO BE INITIALIZED AT ALL. *
****************************************************************
01 ADDRPASS-CALL-AREA.
05 ADDRPASS-PASSED-LINES.
10 ADDRPASS-INLINE1 PIC X(70).
10 ADDRPASS-INLINE2 PIC X(70).
10 ADDRPASS-INLINE3 PIC X(70).
10 ADDRPASS-INLINE4 PIC X(70).
10 ADDRPASS-INLINE5 PIC X(70).
10 ADDRPASS-INLINE6 PIC X(70).
05 FILLER REDEFINES ADDRPASS-PASSED-LINES.
10 ADDRPASS-INLINEX OCCURS 6 TIMES PIC X(70).
05 ADDRPASS-RETURNED-LINES.
10 ADDRPASS-OUTLINE1 PIC X(70).
10 ADDRPASS-OUTLINE2 PIC X(70).
10 ADDRPASS-OUTLINE3 PIC X(70).
10 ADDRPASS-OUTLINE4 PIC X(70).
05 FILLER REDEFINES ADDRPASS-RETURNED-LINES.
10 ADDRPASS-OUTLINEX OCCURS 4 TIMES PIC X(70).
05 ADDRPASS-OUTURB PIC X(30).
05 ADDRPASS-INDEXES.
10 ADDRPASS-INDEX1 PIC X(04).
10 ADDRPASS-INDEX2 PIC X(04).
05 ADDRPASS-ZIP-PLUS-4.
10 ADDRPASS-ZIP5 PIC X(05).
10 ADDRPASS-HYPHEN PIC X(01).
10 ADDRPASS-SECSEG PIC X(04).
05 ADDRPASS-OPTIONS.
10 ADDRPASS-OPTION1 PIC X(01) VALUE '9'.
10 ADDRPASS-OPTION2 PIC X(01) VALUE '5'.
10 ADDRPASS-OPTION3 PIC X(01) VALUE 'N'.
05 ADDRPASS-TYPES.
10 ADDRPASS-TYPE1 PIC X(01).
10 ADDRPASS-TYPE2 PIC X(01).
10 ADDRPASS-TYPE3 PIC X(01).
10 ADDRPASS-TYPE4 PIC X(01).
10 ADDRPASS-TYPE5 PIC X(01).
10 ADDRPASS-TYPE6 PIC X(01).
05 FILLER REDEFINES ADDRPASS-TYPES.
10 ADDRPASS-TYPEX OCCURS 6 TIMES PIC X(01).
05 ADDRPASS-RTN-ORDER.
10 ADDRPASS-RTN-ORD1 PIC X(01) VALUE 'N'.
10 ADDRPASS-RTN-ORD2 PIC X(01).
10 ADDRPASS-RTN-ORD3 PIC X(01).
10 ADDRPASS-RTN-ORD4 PIC X(01).
10 ADDRPASS-RTN-ORD5 PIC X(01).
10 ADDRPASS-RTN-ORD6 PIC X(01).
10 ADDRPASS-RTN-ORD7 PIC X(01).
10 ADDRPASS-RTN-ORD8 PIC X(01).
10 ADDRPASS-RTN-ORD9 PIC X(01).
05 FILLER REDEFINES ADDRPASS-RTN-ORDER.
10 ADDRPASS-RTN-ORDX OCCURS 9 TIMES PIC X(01).
05 ADDRPASS-LINE-MAX.
10 ADDRPASS-LNMX-NUM PIC 9(04) BINARY VALUE 70.
10 ADDRPASS-UNIV-WORD PIC X(01) VALUE SPACES.
10 ADDRPASS-DORM-WORD PIC X(01) VALUE SPACES.
05 ADDRPASS-ANCHOR PIC X(08) VALUE SPACES.
05 ADDRPASS-VERSION PIC X(04) VALUE 'NNNN'.
05 ADDRPASS-COMB-LINES.
10 ADDRPASS-CMB-LINE1 PIC X(01) VALUE SPACES.
10 ADDRPASS-CMB-LINE2 PIC X(01) VALUE SPACES.
10 ADDRPASS-CMB-LINE3 PIC X(01) VALUE SPACES.
10 ADDRPASS-CMB-LINE4 PIC X(01) VALUE SPACES.
10 ADDRPASS-CMB-LINE5 PIC X(01) VALUE SPACES.
10 ADDRPASS-CMB-LINE6 PIC X(01) VALUE SPACES.
05 FILLER REDEFINES ADDRPASS-COMB-LINES.
10 ADDRPASS-CMB-LINEX OCCURS 6 TIMES PIC X(01).
05 ADDRPASS-INPUT-LINE-TYPES.
10 ADDRPASS-INPUT-LINE1 PIC X(01) VALUE SPACES.
10 ADDRPASS-INPUT-LINE2 PIC X(01) VALUE SPACES.
10 ADDRPASS-INPUT-LINE3 PIC X(01) VALUE SPACES.
10 ADDRPASS-INPUT-LINE4 PIC X(01) VALUE SPACES.
10 ADDRPASS-INPUT-LINE5 PIC X(01) VALUE SPACES.
10 ADDRPASS-INPUT-LINE6 PIC X(01) VALUE SPACES.
05 FILLER REDEFINES ADDRPASS-INPUT-LINE-TYPES.
10 ADDRPASS-INPUT-LINEX OCCURS 6 TIMES PIC X(01).
05 ADDRPASS-NO-MERGE-SEC-PMB PIC X(01) VALUE SPACES.
05 ADDRPASS-SKIP-FIRM PIC X(01) VALUE SPACES.
05 ADDRPASS-SKIP-URB PIC X(01) VALUE SPACES.
05 ADDRPASS-SKIP-CSZ PIC X(01) VALUE SPACES.
05 ADDRPASS-FIRM-IDX PIC X(01) VALUE SPACES.
05 ADDRPASS-ZIP-IDX PIC X(01) VALUE SPACES.
05 ADDRPASS-URB-IDX PIC X(01) VALUE SPACES.
05 ADDRPASS-UNUSED PIC X(06) VALUE SPACES.
05 FILLER PIC X(505).
************** END OF ADDRSCAN CALL-AREA *******************
The following examples illustrate the values you can return within the ZIP Code field pAddrZip4.
Example
AddrScan returns a ZIP Code field that consists of a five-digit ZIP Code, a hyphen, and a sector segment number. The hyphen separates the ZIP Code from the sector segment number as shown next.
60148-6494
Example
If you do not have a sector segment number present in the record, the last five positions will be blank. If AddrScan is unable to locate a ZIP Code within your address data, the ZIP Code field returns as:
00000-0000