Create BCC ZIP+4 Return Codes Field
This command will take the information from the errno_, dpv_, nxi_, movetype_, and matchflag_ fields and create and populate a returncodes field with the BCC-equivalent ZIP+4 return codes
ON ERROR com_Mesg=MESSAGE() SET SAFETY OFF ALTER TABLE ALIAS() ADD COLUMN returncode C(10) Replace returncode with "22" FOR "6.1" $ LEFT(errno_,3) Replace returncode with "21" FOR "4.1" $ LEFT(errno_,3) AND EMPTY(dpv_) Replace returncode with "23" FOR "05" $ nxi_ OR "14" $ nxi_ OR "19" $ nxi_ Replace returncode with "26" FOR "G" $ matchflag_ Replace returncode with "27" FOR "K" $ matchflag_ Replace returncode with "28" FOR "F" $ matchflag_ Replace returncode with "31" FOR "04" $ nxi_ OR "06" $ nxi_ OR "07" $ nxi_ OR "08" $ nxi_ OR "09" $ nxi_ OR "10" $ nxi_ OR "11" $ nxi_ OR "12" $ nxi_ OR "13" $ nxi_ OR "15" $ nxi_ OR "16" $ nxi_ OR "17" $ nxi_ OR "18" $ nxi_ OR "20" $ nxi_ OR "66" $ nxi_ Replace returncode with "32" FOR "S" $ LEFT(dpv_,1) OR "D" $ LEFT(dpv_,1) Replace returncode with "33" FOR "3.1" $ LEFT(errno_1) OR "N" $ LEFT(dpv_,1) Replace returncode with "36" FOR "I" $ movetype_ Replace returncode with "37" FOR "F" $ movetype_ Replace returncode with "38" FOR "B" $ movetype_ Replace returncode with "39" FOR "L" $ lacs_ Replace returncode with "98" FOR DELETE() Replace returncode with "NO-STAT" FOR "Y" $ SUBSTR(dpv_,5,1) Replace returncode with "VACANT" FOR "Y" $ SUBSTR(dpv_,4,1) |