//@ //@ Minor Update Package //@ //@ 072406 fv Fixed minor update 6 //@ 072506 fv Added MU11 code //@ 081306 fv Added Contact index change to MU11 //@ 081606 fv Added cnahnge to VContact index 4 to MU11 //@ 082606 fv Started MU12 //@ 091906 fv Added CC_Contact_No to F60 to store contact address information for CC Use FChangeStructure.Pkg // Flag to tell us if we need to restart after file change Integer iRestartFlag Move 0 to iRestartFlag Procedure Perform_Minor_Updates // Called from StreamV Integer fail# String sHold // Check if we are at the latest update If (Cove_Control("COVEMU13") = "DONE") Procedure_Return Send Fast_Field_Rename 108 182 "TAG" Send Fast_Field_Rename 60 134 "CC_CONTACT_NO" // Check if we are at the last update If (Cove_Control("COVEMU12") = "DONE") Procedure_Return Send MU01_Status Send MU02_ShipRush Send MU03_ProdAuthGroup Send MU04_RelateRalinetoCatalog Send MU05_ManuItemNumberSize Send MU06_SerialFlag Send MU07_ShiptoCodeFields Send MU08_ShopOrderFieldRename Send MU09_Shipto_Rep_Name Send MU10_Company_Name_Fields Send MU11_General_Update Send MU12_Minor_Update If iRestartFlag Begin PNOTICE "About to restart program after file change." Runprogram "StreamV" // restart if we did a file change End End_Procedure Procedure Try_To_Lock_File Close fvpar Open fvpar Mode DF_EXCLUSIVE [Err] Begin Send Stop_Box "Unable to lock the system, you must be the only one on the system to install minor updates." Abort End End_Procedure Procedure MU01_Status Integer fail# String sHold Get Cove_Control "COVEMU01" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for new program version." Showln "Locking system." Open Terms Open freight Open viaterms Open salesman Open taxcode Open deptcost Open prodline Open group Begin_Transaction Clear fvpar Move "COVEMU01" to fvpar.code Move "DONE" to fvpar.info Move "Table Record Status Check" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar Clear fvpar Move "PSTATION" to fvpar.code Find gt fvpar by Index.1 Reread fvpar Showln "System Locked." Get Confirm "About to prepare for new program version - MU01" "Table Record Status Check" to fail# If fail# Abort Showln "Updating Status field in table records." Clear Terms Repeat Find gt Terms by recnum [Found] If terms.status ne "I" Begin Reread Terms Move "A" to terms.status FVSAVERECORD terms Unlock End Until [not Found] Clear freight Repeat Find gt freight by recnum [Found] If freight.status ne "I" Begin Reread freight Move "A" to freight.status FVSAVERECORD freight Unlock End Until [not Found] Clear viaterms Repeat Find gt viaterms by recnum [Found] If viaterms.status ne "I" Begin Reread viaterms Move "A" to viaterms.status FVSAVERECORD viaterms Unlock End Until [not Found] Clear salesman Repeat Find gt salesman by recnum [Found] If salesman.status ne "I" Begin Reread salesman Move "A" to salesman.status FVSAVERECORD salesman Unlock End Until [not Found] Clear taxcode Repeat Find gt taxcode by recnum [Found] If taxcode.status ne "I" Begin Reread taxcode Move "A" to taxcode.status FVSAVERECORD taxcode Unlock End Until [not Found] Clear deptcost Repeat Find gt deptcost by recnum [Found] If deptcost.status ne "I" Begin Reread deptcost Move "A" to deptcost.status FVSAVERECORD deptcost Unlock End Until [not Found] Clear prodline Repeat Find gt prodline by recnum [Found] If prodline.status ne "I" Begin Reread prodline Move "A" to prodline.status FVSAVERECORD prodline Unlock End Until [not Found] Clear group Repeat Find gt group by recnum [Found] If group.status ne "I" Begin Reread group Move "A" to group.status FVSAVERECORD group Unlock End Until [not Found] Unlock // fvpar (pStation) End_Transaction [ Err] PNOTICE "Error - MU01 Failed, No update done, contact sysop" [ Err] Abort [not Err] Showln "MU01 Update successfull" [not Err] PNOTICE "Done with Minor Update 01" "Table Record Status Check" End_Procedure Procedure MU02_ShipRush Integer File# Field# fail# String sHold Get Cove_Control "COVEMU02" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for ShipRush." Get Confirm "Minor Update 02 - Name field in Freight File for ShipRush" to fail# If fail# Abort Showln "Renaming Field in Freight" Move 24 to File# Move 38 to Field# Send Start_File_Change File# // Prepare for Terms file change [not Err] Set_Attribute DF_FIELD_NAME of File# Field# to "SHIP_SERVICE_ID" [not Err] Send End_File_Change [ Err] PNOTICE "Error - MU02 Failed - No update done, contact sysop" [ Err] Abort Clear fvpar Move "COVEMU02" to fvpar.code Move "DONE" to fvpar.info Move "Ship Rush Update 1" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU02 Update successfull" [not Err] PNOTICE "Done with Minor Update 02" End_Procedure Procedure MU03_ProdAuthGroup Integer File# Field# fail# String sHold Get Cove_Control "COVEMU03" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to add Group to ProdAuth" Get Confirm "Minor Update 03 - Add Group to Product Authorization" to fail# If fail# Abort Showln "Renaming Field in ProdAuth" Move 109 to File# Move 19 to Field# Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of file_handle Field# to "GRP" [not Err] Send End_File_Change Move 109 to File# Move 19 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 1 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 1 5 to 19 [not Err] Send End_File_Change Move 109 to File# Move 19 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle 1 5 to DF_CASE_IGNORED [not Err] Send End_File_Change [ Err] PNOTICE "Error - MU03 Failed - No update done, contact sysop" [ Err] Abort Clear fvpar Move "COVEMU03" to fvpar.code Move "DONE" to fvpar.info Move "ProdAuth Update" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU03 Update successfull" [not Err] PNOTICE "Done with Minor Update 03" End_Procedure Procedure MU04_RelateRalinetoCatalog Integer File# Field# fail# String sHold Get Cove_Control "COVEMU04" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for ShipRush." Get Confirm "Minor Update 04 - Relate RA Line to Catalog" to fail# If fail# Abort Showln "Relating RALine to Catalog" Move 166 to File# Move 13 to Field# Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_RELATED_FILE of file_handle 13 to 108 [not Err] Set_Attribute DF_FIELD_RELATED_FIELD of file_handle 13 to 5 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [ Err] PNOTICE "Error - MU04 Failed - No update done, contact sysop" [ Err] Abort Clear fvpar Move "COVEMU04" to fvpar.code Move "DONE" to fvpar.info Move "RALine - Catalog" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU04 Update successfull" [not Err] PNOTICE "Done with Minor Update 04" End_Procedure Procedure MU05_ManuItemNumberSize Integer File# Field# counter# fail# String sHold Get Cove_Control "COVEMU05" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for ManuItemNumberSize" // Are we on a server Get_Attribute DF_FILE_TYPE of 248 to counter# If counter# eq 2 Begin PNOTICE "Minor Update 5 on a Server file requires manual execution in Server ADMIN mode. Contact your sysop to perform the following." ; "F101:25 to 30, F102:25 to 30, F210,211,212:4 to 8" Abort End Get Confirm "Minor Update 05 - Manufacturer Item Number Field Size" to fail# If fail# Abort Showln "Widening Field in PoLine, PoTemp, 210, 211, 212" Move 101 to File# Move 25 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_LENGTH of file_handle Field# to 30 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle Move 102 to File# Move 25 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_LENGTH of file_handle Field# to 30 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle Move 210 to File# Move 4 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_LENGTH of file_handle Field# to 8 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle Move 211 to File# Move 4 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_LENGTH of file_handle Field# to 8 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle Move 212 to File# Move 4 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_LENGTH of file_handle Field# to 8 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [ Err] PNOTICE "Error - MU05 Failed - No update done, contact sysop" [ Err] Abort Clear fvpar Move "COVEMU05" to fvpar.code Move "DONE" to fvpar.info Move "ManuItemNoSize" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU05 Update successfull" [not Err] PNOTICE "Done with Minor Update 05" End_Procedure Procedure MU06_SerialFlag Integer File# Field# fail# String sHold Get Cove_Control "COVEMU06" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to Update Serial Flag" Get Confirm "Minor Update 06 - Update Serial Flag" to fail# If fail# Abort Showln "Updateing Serial Flag" Move 108 to File# Move 76 to Field# Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of file_handle Field# to "EXTRASR" [not Err] Send End_File_Change Move 70 to File# Move 91 to Field# [not Err] Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of file_handle Field# to "EXTRASR" [not Err] Send End_File_Change Showln "Updating Serial Flag Data in F108" Open inventry Open catalog Clear inventry Repeat Find gt inventry by recnum [Found] Begin Relate Inventry If status Catalog Begin If (inventry.serial = "Y" and Cove_Field_Value(70,91) = "N") Begin // check what was Serial_Receipt field Reread Catalog Inventry Move "S" to catalog.serial Move "S" to inventry.serial FVSAVERECORD catalog inventry Unlock End End End Until [not Found] Clear fvpar Move "COVEMU06" to fvpar.code Move "DONE" to fvpar.info Move "Serial Update" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU06 Update successfull" [not Err] PNOTICE "Done with Minor Update 06" End_Procedure Procedure MU07_ShiptoCodeFields Integer File# Field# fail# String sHold Get Cove_Control "COVEMU07" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for ShiptoCodeFields Rename" Get Confirm "Minor Update 07 - Name additional Code fields in Shipto File" to fail# If fail# Abort Move 99 to File# Send Start_File_Change File# // Prepare for Terms file change [not Err] Set_Attribute DF_FIELD_NAME of File# 41 to "CODE3" [not Err] Set_Attribute DF_FIELD_NAME of File# 42 to "CODE4" [not Err] Set_Attribute DF_FIELD_NAME of File# 43 to "CODE5" [not Err] Send End_File_Change [ Err] PNOTICE "Error - MU07 Failed - No update done, contact sysop" [ Err] Abort Clear fvpar Move "COVEMU07" to fvpar.code Move "DONE" to fvpar.info Move "Shipto Code Fields" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU07 Update successfull" [not Err] PNOTICE "Done with Minor Update 07" End_Procedure Procedure MU08_ShopOrderFieldRename Integer File# Field# fail# counter# String sHold Get Cove_Control "COVEMU08" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for ShopOrderFieldRename" Send Try_to_Lock_File Get Confirm "Minor Update 08" to fail# If fail# Abort // Shop File Field Renames Move 77 to File# Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of File_handle 33 to "SOURCE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 34 to "ORDER_TYPE" [not Err] Send End_File_Change [ Err] PNOTICE "Error - MU08 Failed - No update done, contact sysop" [ Err] Abort Showln "About to widen Longcode Fields" // Are we on a server? Get_Attribute DF_FILE_TYPE of 248 to counter# If counter# eq 2 Begin PNOTICE "Minor Update 8 on a Server file requires manual execution in Server ADMIN mode. Contact your sysop to perform the following." ; "F18 fields 7,8,9,10 to 50 wide, field 11 to 30 wide." End Else Begin Move 18 to File# Send Prepare_For_File_Change File# [not Err] Set_Attribute DF_FIELD_LENGTH of File_handle 7 to 50 [not Err] Set_Attribute DF_FIELD_LENGTH of File_handle 8 to 50 [not Err] Set_Attribute DF_FIELD_LENGTH of File_handle 9 to 50 [not Err] Set_Attribute DF_FIELD_LENGTH of File_handle 10 to 50 [not Err] Set_Attribute DF_FIELD_LENGTH of File_handle 11 to 30 [not Err] Send Complete_File_Change [ Err] Structure_Abort file_handle [ Err] PNOTICE "Error - MU08 Failed - No update done, contact sysop" [ Err] Abort End Clear fvpar Move "COVEMU08" to fvpar.code Move "DONE" to fvpar.info Move "Shop-LongCode" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU08 Update successfull" [not Err] PNOTICE "Done with Minor Update 08" End_Procedure Procedure MU09_Shipto_Rep_Name Integer File# Field# fail# counter# String sHold Get Cove_Control "COVEMU09" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for Shipto Rep Name" Send Try_to_Lock_File Get Confirm "Minor Update 09" to fail# If fail# Abort // Shop File Field Renames Move 99 to File# Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of File_handle 30 to "REP" [not Err] Send End_File_Change [ Err] PNOTICE "Error - MU09 Failed - No update done, contact sysop" [ Err] Abort Clear fvpar Move "COVEMU09" to fvpar.code Move "DONE" to fvpar.info Move "ShipRepName" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Showln "MU09 Update successfull" [not Err] PNOTICE "Done with Minor Update 09" End_Procedure Procedure MU10_Company_Name_Fields Integer File# Field# fail# counter# String sHold Get Cove_Control "COVEMU10" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Showln "About to prepare for Company Name Fields" Send Try_to_Lock_File Get Confirm "Minor Update 10" to fail# If fail# Abort Showln "About to widen and name company name fields and name field in F72." Move 54 to File# Send Prepare_For_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of File_handle 18 to "COMPANY_NAME1" [not Err] Set_Attribute DF_FIELD_LENGTH of File_handle 18 to 50 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 19 to "COMPANY_NAME2" [not Err] Set_Attribute DF_FIELD_LENGTH of File_handle 19 to 50 [not Err] Send Complete_File_Change [ Err] Structure_Abort file_handle [ Err] PNOTICE "Error - MU10 Failed - No update done, contact sysop" [ Err] Abort // Update Company File Open Company Showln "Copying company name to Company_Name1 field." Clear Company Repeat Find gt company by recnum [Found] Begin Reread Company Move Company.company to company.Company_name1 Saverecord Company Unlock End Until [not Found] Showln "About to name field in special pricing." Move 72 to File# Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of File_handle 58 to "INVOICED_QTY" [not Err] Send End_File_Change [not Err] Begin Clear fvpar Move "COVEMU10" to fvpar.code Move "DONE" to fvpar.info Move "Company_Names" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [Err] PSTOP "Unable to update FVPAR" End [not Err] Showln "MU10 Update successfull" [not Err] PNOTICE "Done with Minor Update 10" End_Procedure Procedure MU11_General_Update Integer File# Field# fail# counter# iIndex String sHold Get Cove_Control "COVEMU11" to sHold If sHold eq "DONE" Procedure_Return Move 1 to iRestartFlag Send Try_to_Lock_File Get Confirm "Minor Update 11" to fail# If fail# Abort // Modify indexs on Contact File [not Err] Send Start_File_Change 53 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 57 to "LANGUAGE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 99 to "WEB_SITE" [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 1 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 1 4 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 2 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 2 4 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 4 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 4 4 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 5 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 5 4 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 6 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 6 5 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 7 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 7 1 to 26 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 7 2 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 7 3 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 7 4 to 3 [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle 7 1 to DF_CASE_IGNORED [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle 7 2 to DF_CASE_IGNORED [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle 7 3 to DF_CASE_IGNORED [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 8 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 8 5 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 9 to 6 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 9 6 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 10 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 10 5 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 11 to 6 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 11 6 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 12 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 12 5 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 13 to 6 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 13 6 to 3 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle Get Confirm "Rename invoice.authorization (F56:94) If you are using these fields (Cove does not), click YES to move the data." to fail# If not fail# Begin PNOTICE "About to move data, this requires one run through the invoices file, which could take a bit. Do not touch keyboard wile it is running." Open Invoices Clear invoices Repeat Find gt invoices by recnum If not (Mod(invoices.recnum,10)) Showln invoices.recnum Move 94 to FieldIndex MoveStr invoices.Recnum& to sHold [Found] If sHold gt "!" Begin Reread Invoices Move invoices.Recnum& to sHold Move 40 to FieldIndex Move sHold to invoices.Recnum& Saverecord Invoices Unlock End Until [not Found] End [not Err] Send Start_File_Change 56 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 94 to "SPARE94" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 133 to "FULFILLMENT_PO" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 118 to "PO_DATE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 40 to "CC_AUTH_CODE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 143 to "CC_AUTH_AMT" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 52 to "CC_NUMBER" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 125 to "CC_DATE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 126 to "CC_SECURE_CODE" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 58 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 50 to "HOUSE_PO_NO" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 51 to "HOUSE_PO_LINE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 110 to "PO_ITEM_NO" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 121 to "PO_PRICE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 122 to "PO_LINE" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 60 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 85 to "SPARE85" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 108 to "CC_AUTH_CODE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 91 to "CC_AUTH_AMT" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 122 to "CC_DATE" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 47 to "CC_NUMBER" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 127 to "CC_SECURE_CODE" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 61 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 68 to "OINVLINEPACK" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 64 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 68 to "OINVLINEPACK" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 65 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 47 to "EXTRA47" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 76 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 38 to "BOM_LINE" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 81 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 57 to "LANGUAGE" [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 1 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 1 4 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 2 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 2 4 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 3 to 1 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 4 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 4 4 to 3 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 4 2 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 4 3 to 4 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 5 to 4 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 5 4 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 6 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 6 5 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 7 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 7 5 to 3 [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle 8 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle 8 5 to 3 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 88 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 66 to "TAG" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 99 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 44 to "CONTACT_NO" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 108 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 146 to "SPARE146" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 181 to "LABELSET" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle // Relate BGMemger to BgMaster [not Err] Send Start_File_Change 141 [not Err] Set_Attribute DF_FIELD_RELATED_FILE of file_handle 5 to 140 [not Err] Set_Attribute DF_FIELD_RELATED_FIELD of file_handle 5 to 5 [not Err] Send End_File_Change [ Err] Structure_Abort file_handle // Add index to KeyWords file to allow rebuilding of one item [not Err] Begin PNOTICE "I am about to zero out the Keyword files since an index is changing. Please rebuild after file change is done." Open keywords Mode DF_EXCLUSIVE [~err ] Begin Zerofile keywords Close wordlist End Open wordlist Mode DF_EXCLUSIVE [~err ] Begin Zerofile wordlist Close wordlist End End [not Err] Send Start_File_Change 147 [not Err] Create_Index file_handle At iIndex [not Err] If iIndex eq 2 Begin [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle 1 1 to DF_CASE_IGNORED // fix existing index [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle 1 2 to DF_CASE_IGNORED // " " " " " [not Err] Set_Attribute DF_INDEX_NUMBER_SEGMENTS of file_handle iIndex to 2 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle iIndex 1 to 6 [not Err] Set_Attribute DF_INDEX_SEGMENT_FIELD of file_handle iIndex 2 to 5 [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle iIndex 1 to DF_CASE_IGNORED [not Err] Set_Attribute DF_INDEX_SEGMENT_CASE of file_handle iIndex 2 to DF_CASE_IGNORED [not Err] Send End_File_Change End Else Begin Showln "Index 2 alreay there." Structure_Abort file_handle // index already there End [ Err] Structure_Abort file_handle [ Err] PNOTICE "Error - MU11 Failed" [ Err] Abort Clear fvpar Move "COVEMU11" to fvpar.code Move "DONE" to fvpar.info Move "General Update" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar [not Err] Send Start_File_Change 166 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 46 to "PO_NO" [not Err] Set_Attribute DF_FIELD_NAME of File_handle 63 to "PO_LINE" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Send Start_File_Change 214 [not Err] Set_Attribute DF_FIELD_NAME of File_handle 12 to "COMMENT_NO" [not Err] Send End_File_Change [ Err] Structure_Abort file_handle [not Err] Showln "MU11 Update successfull" [not Err] PNOTICE "Done with Minor Update 11" End_Procedure Procedure MU12_Minor_Update Integer File# Field# fail# counter# String sHold Get Cove_Control "COVEMU12" to sHold If sHold eq "DONE" Procedure_Return // Shop File Field Renames Move 54 to File# Send Start_File_Change File# [not Err] Set_Attribute DF_FIELD_NAME of File_handle 233 to "SHIP_DOC_CODE" [not Err] Send End_File_Change [ Err] PNOTICE "Error - MU12 Failed - No update done, contact sysop" [ Err] Abort Clear fvpar Move "COVEMU12" to fvpar.code Move "DONE" to fvpar.info Move "MinorUpdate" to fvpar.description FVTIMESTAMP fvpar FVSAVERECORD fvpar End_Procedure // // Check to be sure fields have the right name. // Procedure Fast_Field_Rename Integer iFile Integer iField String sFieldName Boolean bOpen String sHold // // Check if field name is current, open file, check, close file. // [debug] Showln "Fast Field Rename, check file: " iFile ":" iField ":" sFieldName Get_Attribute DF_FILE_OPENED of iFile to bOpen If not bOpen Open iFile If (Cove_Field_Name(iFile,iField) = sFieldName) Begin Procedure_Return End Close iFile // // Make sure we don't see the can't open error // Send Ignore_Error of Error_Object_ID DFERR_CANT_OPEN_DATA_FILE Send Ignore_Error of Error_Object_ID DFERR_FILE_ACCESS_VIOLATION Indicate Err False // // Try to open the file exclusive, if we can't open it exclusive it is not opened // and we just open the file shared and continue on our way. // Open iFile Mode DF_EXCLUSIVE Get_Attribute DF_FILE_OPENED of iFile to bOpen // // Reset the error handling to normal // Send Trap_Error of Error_Object_ID DFERR_CANT_OPEN_DATA_FILE Send Trap_Error of Error_Object_ID DFERR_FILE_ACCESS_VIOLATION // // If we did not get the file exclusive we're done, open the file normal. // If not bOpen Begin Open iFile Procedure_Return End [debug] Showln "Fast Field Rename, updating: " iFile ":" iField ":" sFieldName // // At this point we have it open exclusive // Send Start_File_Change iFile [not Err] Set_Attribute DF_FIELD_NAME of File_handle iField to sFieldName [not Err] Send End_File_Change [ Err] PNOTICE "Error - in FastFieldRename, contact sysop" iFile iField sFieldName [ Err] Abort // // Now close and reopen the file shared // Close iFile Open iFile // // Update the field rename history // Send OPEN_COMMENT_FOR_WRITE "PHT" "COVEFSLV" 0 Trim comment.text to sHold Append sHold CR LF (yymmdd(day)) " Renamed: " iFile ":" iField ":" sFieldName Move (Right(sHold,4000)) to comment.text Send Close_Write_Comment End_Procedure