
When print or str are called on PAF record (named tuple) a formated PAF string is returned, which is useful for writing records to a file. The SAM-like tags are converted into their specified types and stored in a dictionary with the tag name as the key and the value a named tuple with fields name, type, and value. If used as an iterator, then each object returned is a named tuple representing a single line in the PAF file.Įach named tuple has field names as specified by the fields parameter.

$buildingFlag ="Y" if length($rawBldLine) > 0 $buildingNumberFlag ="Y" if $bnumber ne "0" My ($subBuildingFlag,$buildingFlag,$buildingNumberFlag) = ("N","N","N") # Format rules are based on presence of builing name, subbuilding and number My ($fmtSubBuilding, $fmtBuilding ) = ( "","") My $fmtPoBox = "PO BOX $poBox" if (length($poBox) > 0) My $fmtPostTown = removePunch($PostTown) $rawBldLine = removePunch($rawBldLine,"d") $rawSubLine = removePunch($rawSubLine,"d") $fmtLocality = removePunch($Locality,"dq") $fmtDepLocality = removePunch($DepLocality) $fmtoKey = $fmtaKey if $fmtPcType eq "L" $DepSteet, $fmtDepSteetEnd, $Steet, $fmtSteetEnd , $fmtCompany, $fmtDepartment, $rawSubLine, $rawBldLine , $fmtPcType, $concat, $dps, $fmtsUser ,

I'll see if I can find the code.įound some ugly 8 year old Perl - use with caution while ( ) # Reading from mysql view - you can work this out from the fields populated by the split /\t/

I did the build of addresses from the relational format a long while back. If you want it done by end of week you would be better off getting the "Compressed Standard" version which is in fact the expanded addresses that you are after but of course it is not normalised for a database. I take it you've seen all the rules in the PAF programmers guide ? Be depressed - thats one big job - lots of rules many exceptions.
