Differences between revisions 5 and 6
Revision 5 as of 2013-09-18 06:09:34
Size: 3082
Editor: localhost
Comment: converted to 1.6 markup
Revision 6 as of 2017-06-08 03:34:59
Size: 3088
Editor: clifford
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
  * element size=40   * element size=44
Line 15: Line 15:
Line 31: Line 32:
Line 55: Line 57:

Post Code

Now can input a post code in sieat and draad to automatically get a list of city and states, pick one, then the city and state field in the screen will be filled with the picked one.

Admin

To have this feature , we will need the postcode.idx index file. It can be obtained by:

  • copying it from /u/ccdev/standard (contains Australian postcodes and suburbs) or
  • generating using fcreate
    • prefix=0
    • suffix=0
    • key size=40
    • element size=44
    • max no of key=18000
    • leading nulls=N

Then import the data into the idx using /u/ccdev/std/utbinx11/imppcmin. Run imppcmin then select a file call pc-full_20071128.csv (a csv file download from Australia Post with all the postcode and city pairs). You can find pc-full_20071128.csv under /u/ccdev/std/ut/, or download it again from Australian Post.

If the postcode.idx does not exist in the user's directory , sieat and draad will give error and not run.

You must create or copy the postcode.idx under the client's directiory and enable the postcode search in gencont.

imppcmin

the imppcmin is expecting a csv imput file , in the format

"entry","entry",.......\n

"entry","entry",.......\n

"entry","entry",.......\n

  • : :

The first row is expected to be the heading and will be ignored. Imppcmin will not read this line's data into postcode.idx. If later Australian Post has updated this document, without heading row, just add a dummy first row will do.

For the rest of the rows, the fist column is expected to be postcode, second column is the city, the third one is the state. as the example below.

"0810","JINGILI","NT",,"DARWIN DELIVERY CENTRE","085","NT1","001","DARWIN","Delivery Area "

imppcmin will only read the first three columns, and ignore the rest , since only the first three are needed. If, in the future, Australian post changes the layout of the row, as long as the sequence of the first three column is the same, imppcmin will still work properly.

US post code

the us postcode get from BRAUN is store under /u/ccdev/std /ut/USZIPCODESDATA.xls

swep the second and the third colum so that its in the right format and save it as csv then we get

/u/ccdev/std /ut/USZIPCODESDATA.csv, (if under linux remember to use ooffice2.0 , there are just too many rows for 1.0)

after that fcreate postcode.idx

  • generating using fcreate
    • prefix=0
    • suffix=0
    • key size=40
    • element size=40
    • max no of key=40000
    • leading nulls=N

we are using the same name as the australia one, right now we can use either AUS postcode or US postcode

after that rum imppcmin enter /u/ccdev/std /ut/USZIPCODESDATA.csv when asked, enter ,enter,enter.....

after that the postcode.idx will have US postcode information.

or if you can just copy /u/cc/standard/postcode.idx.US remane it to $CCDIR/user/postcode.idx

now in sieat or draad try enter 4 or 5 digit postcode in customer detail -> zone or postcode to see if work,


postcode (last edited 2017-06-08 03:34:59 by clifford)