Change a non-market fone file into one with markets


The attached spec MARKETCONVERT.SPX can do any of the following:


1) Convert a non-market phone file to a market phone file.

2) Change an existing market phone file to different market settings.

3) Convert a market phone file to a non-market phone file.


NOTE: This spec is NOT designed to directly reassign records that were assigned into the wrong market name. For instance, if a record wasflagged as being in the RED market, but should have been in the BLUE market you will need to change the market location for those recordsBEFORE running this spec.


The following things are done ensure the new file is built properly.


1) Create new market codes and assign market numbers to each one.

2) Move this market number into the market code location [5129.3]

3) Convert the wheretogofield [5161.15] to the correct information. This properly deals with both hidden and Up-In-The-Air numbers.


Change the following defines:


''Specify the file to work on, can be a .fon file or converted ascii file>Define @Filename Mark.fon ''Specify the file type, either foneformat or ascii>Define @InputType Fone_format '' ASCII=16000:1.10 ''Specify the output filename, will always be Ascii>Define @Outfile Mark.asc ''Specify your market location>Define @MarketLoc 51.1 ''Specify the market names in the order you want them numbered, separated by slashes>Define @Markets A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z ''Use this define if you want to have the last market be a catchall market. Any data that does not match the ''above list, will be assigned this market.''>Define @CatchAll''Use this define if you have a preversion 8 fone file''>Define @Version7.7 ''To convert a Market Phone file to one that does not use markets, just turn on the Cnvt2Non define and then ''rebuild the new file with no market commands.''>Define @Cnvt2Non ''*****************  DO NOT TOUCH ANYTHING BELOW HERE ********************** >PurgeSame~Input @FileName @InputType~Output @OutFile ASCII TrimBlanks~Define Marketdef: [@MarketLoc#@Markets]Timezone:  [23.2]Marketnum: [5129.3*Z]Wheretogo: [5161.15$]MarketNameShort: [5199.8$]MarketNameLong:  [5300.20$]Systemcall: [(Wheretogo) 1.2#TZ]Hidden_Sys: [(Wheretogo) 1.4#"Hid_"] and [(Wheretogo) 5.2#TZ]UITA_Sys:  [(Wheretogo) 1.5#"UITA_"] and [(Wheretogo) 6.2#TZ]SysBucket: [(Wheretogo) 6.1]HidBucket: [(Wheretogo) 10.1]UitaBucket: [(Wheretogo) 11.1]Bucket:   [4999]Procedure= Mktcv:>IfDefine @Cnvt2NonModify Marketnum = 0>Else>IfDefine @CatchAllModify Marketnum = Subscript(Bal(Marketdef))>ElseModify Marketnum = Subscript(Marketdef)>Endif>Endif>IfDefine @Version7.7>ElseModify MarketNameLong = [@MarketLoc$]If [(MarketNameLong) 9.12^NB]Modify MarketNameShort = "********"ElseModify MarketNameShort = [(MarketNameLong)1.8$]Endif>EndifIf Systemcall or Hidden_Sys or UITA_SysIf Hidden_SysModify Bucket = HidBucketModify Wheretogo = "HID_"ElseIf UITA_SysModify Bucket = UitaBucketModify Wheretogo = "UITA_"ElseModify Bucket = SysBucketBlank WheretogoEndifEndif>IfDefine @Cnvt2NonModify Wheretogo = Strip(Wheretogo) Join "TZ" Join [Timezone$] Join "B" &Join [Bucket$]>ElseModify Wheretogo = Strip(Wheretogo) Join "TZ" Join [Timezone$] Join &"B" Join [Bucket$] Join "M" Join [Marketnum$]>EndifBlank BucketEndifWriteCase}~Exc Procedure=Mktcv~End




To build the new PHONE FILE using output from Mentor proc.


At the operating system prompt, set the CFMCRESUME variable whenever loading study with SUSPEND records



In UNIX: setenv CFMCRESUME /cfmc/resume/


Take the file <study^asc> and read it into FONEBULD after specifying the following commands:


ASCII                        ''You will be reading an ASCII converted fileMAX_MARKETS=30           ''Usually a good idea to set > actual maximumMARKET_LOCATION 51,1      ''Location of Market Identifier>REP $A=01,...,26;$B=A,...,Z    ''$A= Market Number, $B=Market IdentifiersMARKET $B,$A>ENDREPEATGO<newstudy>           ''Name of ^fon file to build<study^asc><cr>QUIT