No valid database connection Table './usr_web422_1/jos_dbcache' is marked as crashed and last (automatic?) repair failed SQL=REPLACE INTO `jos_dbcache` (id, groupname,expire,value) VALUES ('4fb49d87a7b487a12ffa2547844eee80','joomfish-en-GB',FROM_UNIXTIME('1283553430'),COMPRESS('a:2:{s:6:\"output\";s:0:\"\";s:6:\"result\";a:7:{i:0;O:8:\"stdClass\":8:{s:2:\"id\";s:2:\"21\";s:5:\"title\";s:11:\"Breadcrumbs\";s:6:\"module\";s:15:\"mod_breadcrumbs\";s:8:\"position\";s:10:\"breadcrumb\";s:7:\"content\";s:0:\"\";s:9:\"showtitle\";s:1:\"1\";s:7:\"control\";s:0:\"\";s:6:\"params\";s:73:\"showHome=1\nhomeText=Home\nshowLast=1\nseparator=\nmoduleclass_sfx=\ncache=0\n\n\";}i:1;O:8:\"stdClass\":8:{s:2:\"id\";s:2:\"18\";s:5:\"title\";s:18:\"Language selection\";s:6:\"module\";s:23:\"mod_jflanguageselection\";s:8:\"position\";s:4:\"left\";s:7:\"content\";s:0:\"\";s:9:\"showtitle\";s:1:\"0\";s:7:\"control\";s:0:\"\";s:6:\"params\";s:81:\"type=dropdownplusimage\nshow_active=1\ninc_jf_css=0\nmoduleclass_sfx=\ncache_href=1\n\n\";}i:2;O:8:\"stdClass\":8:{s:2:\"id\";s:2:\"26\";s:5:\"title\";s:10:\"Quicklinks\";s:6:\"module\";s:14:\"mod_exmenu-j15\";s:8:\"position\";s:4:\"left\";s:7:\"content\";s:0:\"\";s:9:\"showtitle\";s:1:\"1\";s:7:\"control\";s:0:\"\";s:6:\"params\";s:883:\"class_sfx=\nmoduleclass_sfx=\ncache=0\nmenutype=quicklinks\nmenu_source_type=menu\nmenu_source_value=\nmenu_source_show_section=default\nmenu_source_show_category=default\nmenu_source_show_content_item=default\nmenu_source_order=ordering\ndefault_content_itemid=\nmenu_style=select_tree\nmenu_view_plugin_name=\nmenu_images=0\nexpand_menu=0\nexpand_min=\nmax_depth=10\nhide_first=0\nshow_parent=0\nparent_item=\ncurrent_level_begin=0\nlevel_begin=\nsplit_menu=\nmenu_count=1\nquery_cache=0\nparse_access_key=3\ntitle_attribute=0\nlevel_class=0\nactive_menu_class=0\nelement_id=0\nmenu_template=1\nmenu_template_name=menu.html\nindent_image=0\nindent_image1=\nindent_image2=\nindent_image3=\nindent_image4=\nindent_image5=\nindent_image6=\nspacer=\nend_spacer=\nselect_list_submit_text=Go\nselect_list_submit_hide=0\ncall_getitemid=1\ncurrent_item=smart\ncurrent_item_duplicates=convert_active\naccess_keys=\nexact_access_level=0\n\n\";}i:3;O:8:\"stdClass\":8:{s:2:\"id\";s:2:\"23\";s:5:\"title\";s:15:\"Site navigation\";s:6:\"module\";s:14:\"mod_exmenu-j15\";s:8:\"position\";s:4:\"left\";s:7:\"content\";s:0:\"\";s:9:\"showtitle\";s:1:\"1\";s:7:\"control\";s:0:\"\";s:6:\"params\";s:881:\"class_sfx=\nmoduleclass_sfx=\ncache=0\nmenutype=mainmenu\nmenu_source_type=menu\nmenu_source_value=\nmenu_source_show_section=default\nmenu_source_show_category=default\nmenu_source_show_content_item=default\nmenu_source_order=ordering\ndefault_content_itemid=\nmenu_style=css_tree\nmenu_view_plugin_name=\nmenu_images=left\nexpand_menu=0\nexpand_min=\nmax_depth=10\nhide_first=0\nshow_parent=0\nparent_item=\ncurrent_level_begin=0\nlevel_begin=\nsplit_menu=\nmenu_count=1\nquery_cache=0\nparse_access_key=3\ntitle_attribute=0\nlevel_class=0\nactive_menu_class=2\nelement_id=0\nmenu_template=0\nmenu_template_name=menu.html\nindent_image=0\nindent_image1=\nindent_image2=\nindent_image3=\nindent_image4=\nindent_image5=\nindent_image6=\nspacer=\nend_spacer=\nselect_list_submit_text=Go\nselect_list_submit_hide=0\ncall_getitemid=1\ncurrent_item=smart\ncurrent_item_duplicates=convert_active\naccess_keys=\nexact_access_level=0\n\n\";}i:4;O:8:\"stdClass\":8:{s:2:\"id\";s:2:\"32\";s:5:\"title\";s:10:\"Newsletter\";s:6:\"module\";s:15:\"mod_jnewsletter\";s:8:\"position\";s:5:\"right\";s:7:\"content\";s:0:\"\";s:9:\"showtitle\";s:1:\"1\";s:7:\"control\";s:0:\"\";s:6:\"params\";s:534:\"moduleclass_sfx=\ncssfile=default.css\neffect=default\nlistids=0\nred_url=\nlinear=0\nintrotext=Subscribe to the hermocom email newsletter, if you would like to be informed about project status and software updates.\nshowlistname=0\ndefaultchecked=1\nshownamefield=1\ncolumn1=0\ncolumn2=0\ncolumn3=0\ncolumn4=0\ncolumn5=0\ndropdown=0\nselecteddrop=0\nfieldsize=18\nposttext=\nreceivehtmldefault=0\nshowreceivehtml=0\nbutton_text=\nbutton_img=\nbutton_text_change=\nbutton_img_change=\nmootools_btntext=\nmootools_boxw=200\nmootools_boxh=210\nmod_align=\ncache=0\n\n\";}i:5;O:8:\"stdClass\":8:{s:2:\"id\";s:2:\"33\";s:5:\"title\";s:4:\"Poll\";s:6:\"module\";s:8:\"mod_poll\";s:8:\"position\";s:5:\"right\";s:7:\"content\";s:0:\"\";s:9:\"showtitle\";s:1:\"1\";s:7:\"control\";s:0:\"\";s:6:\"params\";s:46:\"id=1\nmoduleclass_sfx=\ncache=1\ncache_time=900\n\n\";}i:6;O:8:\"stdClass\":8:{s:2:\"id\";s:2:\"20\";s:5:\"title\";s:14:\"hermocom login\";s:6:\"module\";s:9:\"mod_login\";s:8:\"position\";s:5:\"right\";s:7:\"content\";s:0:\"\";s:9:\"showtitle\";s:1:\"1\";s:7:\"control\";s:0:\"\";s:6:\"params\";s:92:\"cache=0\nmoduleclass_sfx=\npretext=\nposttext=\nlogin=1\nlogout=1\ngreeting=1\nname=1\nusesecure=0\n\n\";}}}'))
hermocom Logo  
productivity everywhere  
Home Knowledge base HP Palmtops PDB2X - Phone book sync
03 | 09 | 2010
No valid database connection Table './usr_web422_1/jos_dbcache' is marked as crashed and last (automatic?) repair failed SQL=REPLACE INTO `jos_dbcache` (id, groupname,expire,value) VALUES ('04f8b83fb6efa280646cb4b3ee3e03c0','joomfish-en-GB',FROM_UNIXTIME('1283553430'),COMPRESS('a:2:{s:6:\"output\";s:0:\"\";s:6:\"result\";a:1:{i:0;O:8:\"stdClass\":41:{s:2:\"id\";s:2:\"65\";s:5:\"title\";s:120:\"PDB2X - Synchronize your HP 100/200LX Telephone book data to the Post/LX address book, cellphone address book, PIM/PE...\";s:5:\"alias\";s:5:\"pdb2x\";s:11:\"title_alias\";s:0:\"\";s:9:\"introtext\";s:24131:\"Contents of this page:\r\n\r\n\r\n\r\n
\r\n\r\n\r\n\r\n

Introduction:

\r\n\r\nDo you use the email software Post/LX by D&A Software?
\r\nDo you also keep two email address books on your Plamtop? One as the built-in phone book\r\nand another in Post/LX as \"post.adr\"?\r\n

\r\nIf yes, PDB2ADR may be interesting for you.\r\n

\r\nThere are two ways to automatically create a post.adr from your built-in phone book. One\r\nway is to use a smart clip inside the phone book. This method is described\r\nbehind this link.\r\n

Another more comfortable way is to use the program pdb2adr, which is described and available\r\nhere.\r\nWith PDB2ADR you can even export mobile phone numbers from the built-in phone book\r\nto post.adr for use to\r\nsend SMS messages with your mobile phone out of Post/LX in conjuction with Stefan Peichl´s PDU\r\n(read my mobile Internet page to learn more about this).\r\n

\r\nIn addition, PDB2ADR lets you create your Post/LX distribution list files (*.adr) automatically.\r\n

\r\nPDB2PHN, which is also included in the PDB2X package, lets you transfer your whole HPLX phone book\r\n(only names with one phone number for each name) to your cellular phone. You need Robot/LX and a\r\nregistered version of WWW/LX for that.

\r\nLast but not least, PDB2PIM converts the HPLX phone book to a PIM/PE compatible database format.\r\nThis is useful if you either want to migrate the built-in phone book entirely to PIM/PE, or\r\nif you still use the built-in one as your standard (as I do) and use PIM/PE additionally, so\r\nPDB2PIM lets you synchronize both with one batch file call.\r\n

\r\nI have a batch file called pdb2x.bat which uses all three programs to synchronize my HPLX phone book\r\nevery night (the batch is called by the appointment book) to PIM, cellphone and Post/LX.\r\n\r\n\r\n\r\n\r\n

Requirements and Download:

\r\n\r\nIn order to use the programs from the PDB2X package, you need of course a phone book file on your palmtop\r\n(usually c:\\_dat\\phone.pdb). PDB2ADR is needed if you want to synchronize your PDB data with the Post/LX address book. And for PDB2PHN (PDB data synchronisation to the mobile phone\'s address book) you need WWW/LX in order to establish a connection to your mobile phone.

\r\nOther requirements:\r\n

    \r\n
  • GDBIO\r\n which dumps your phone.pdb into a comma seperated value file and thus prepares your phone\r\n boook for use with PDB2X

  • \r\n
  • The PDB2X package (download see below)\r\n which extracts the relevant data and puts them to stdout (redirect it into the output file!)

  • \r\n
  • BIGSORT v2.2 by Turgut Kalfaoglu, if you prefer sorted output

  • \r\n
  • SED, the strem editor, for MS-DOS\r\n is also needed to sort the full phone book with notes in CDF format. You don´t need it if\r\n you don´t want sorted output.
  • \r\n
\r\nThe PDB2xxx.EXE binaries, SED and BIGSORT are considered to be installed somewhere in your PATH in\r\nthe following description. If they are in a directory not accessable through your PATH, please give\r\nexplicit paths in the batch file(s).\r\n\r\n{quickdown:15}\r\n\r\n\r\n\r\n

PDB2ADR: Standard setup:

\r\n\r\nGo to DOS on your LX, create a directory c:\\_tmp\\ (md c:\\_tmp) and do a

\r\ngdbio c:\\_dat\\phone.pdb > c:\\_tmp\\phone.cdf.

\r\nThis creates\r\na first comma seperated value file from your phone book which you need to figure out the correct\r\nparameters for PDB2ADR.\r\n
\r\nOpen the phone.cdf file in your favorite text editor (preferrably without line wrapping) and search\r\nfor an entry that has an email address and, if you want to export them too, a mobile phone number.\r\n
\r\nSuch an entry should look like (for example)\r\n

\r\n\"Hertrich, Daniel\",\"\",\"private\",\"\",\"+491231234567\",\"+491212345678\",\"\",\"dummy.address@provider.de\",\"addressline1\",\"addressline2\",\"\",\"\"\r\n
\r\nNow you have to count in which column which relevant entry is.\r\nYou need: Name, email address and perhaps the mobile phone number, depending on if you want to send SMSs with Post/LX or not.\r\n
\r\nLet´s count in my example:\r\n
The name is in column 1 (this is most likely also the case in your cdf file).\r\n
The email address is in column 8 (you also have to count empty columns (\"\"))\r\n
The mobile phone number is in column 5 (+491231234567).\r\n

\r\nThese column associations are the same for every entry.\r\n

\r\nNow call PDB2ADR this way:\r\n

\r\npdb2adr phone.cdf 1 8 5 0 0 > test.adr\r\n

\r\nand see if test.adr contains the email addresses and phone numbers in the correct format.\r\n

\r\n(Alternatively, you can call GDBIO once with the /S parameter, which shows the structure of\r\nyour database. I.e. the output of GDBIO C:\\_DAT\\PHONE.PDB /S should show you the field numbers\r\nyou need, so you don´t need to count. ;-) )\r\n

\r\nExplanation of the PDB2ADR parameters:
\r\n1. input file name, must be comma seperated values file, created with GDBIO from the phone book
\r\n2. field number of names
\r\n3. field number of email addresses
\r\n4. field number of mobile phone numbers
\r\n5. field number of category names (see description below)
\r\n6. category name if 5th parameter not equal 0, otherwise \"0\". (see description below)
\r\n post.adr means rediretion of the output to the file post.adr. If you leave away the redirection,\r\noutput is shown on the screen, which is only useful for debugging purposes.\r\n

\r\nIf you don´t want phone numbers to be exported, give a 0 as field number for phone numbers, i.e.\r\npdb2adr phone.cdf 1 8 0 0 0 > test.adr.
\r\nYou can also give a 0 for the email field, then you won´t get email addresses in your resulting file.\r\n

\r\nThe email addresses are exported in the format\r\n
\r\n Hertrich, Daniel <dummy.address@provider.de>\r\n
\r\nand the phone numbers are exported in the format\r\n
\r\n+491231234567 | Hertrich, Daniel\r\n

\r\nPlease note that email addresses and phone numbers themselves are exported exactly as you enetered them\r\ninto the phone book, i.e. you have to enter all phone numbers in a format that PDU can directly\r\nuse. Up to version 2.0, PDU doesn\'t tolerate any other characters than numbers (even space is not\r\nallowed). I asked Stefan Peichl if he could make PDU more tolerant and he did it! Thanks!\r\nThe new PDU versions (since 2.1, download here) now\r\naccepts spaces ( ), dot (.), minus (-), slash (/) and parentheses (()) within\r\na mobile phone number. And of course still the plus at the beginning. So you don´t have to\r\nmodify all your phone book entries which contained non-number characters for better readability.\r\n

\r\nSo a number like +49.177.1234567 or (0177) 123 45 67 or +49/177-123.45.67 is now accepted.
\r\nBut be aware that something like +49 (0)177 1234567 will not work, if the 0 between the parentheses\r\nis optional, depending on the country code (+49) to be dialed or not. I don´t know if it\r\nis also the case in other countries, but here in Germany you have to dial a 0 before a long-distance call\r\nbut if you dial in from outside Germany using the country code, you must not dial the 0. In the\r\ngiven example, PDU would dial the country code and the zero.\r\n

\r\nEvery email address field in your phone book has to hold just one\r\nemail address in the usual format name@domain. Nothing else. Otherwise Post/LX will not be able\r\nto make use of the entry in post.adr.\r\n

\r\nEntries with empty email address fields will not be converted into the email address section of\r\nthe output of PDB2ADR, and entries without mobile phone number will not be taken into the\r\nphone number section.\r\n

\r\nIf your test.adr looks good, you can make a backup copy of your original post.adr and let PDB2ADR instead\r\ncreate your post.adr. You even can write a batch file which does that automatically, maybe every night,\r\ninvoked by the appointment book at 2am, like I do. See a sample batch file for all PDB2xxx programs below!\r\n

\r\nIf you prefer sorted output (the phone.cdf file is not alphabetically sorted!), you\r\nhave to use a sorting program and run it over the cdf file. I found a program called BIGSORT, written\r\nby Turgut Kalfaoglu from Turkey. It is very fast and easy to use. Link see in section \"Requirements\".\r\nCall BIGSORT with the parameter /i, so that it is case insensitive, and redirect its output\r\nto a another cdf file, for example phone_s.cdf. Then let PDB2ADR process that sorted file.\r\n

\r\nIf you use commas in your PDB as a delimiter between last and first name (\"Hertrich, Daniel\"\r\nfor example), you may have problems with Post/LX as it sees a comma in the To: field as a delimiter\r\nbetween different destinations. To avoid these problems, you should remove all commas from your\r\npost.adr file after it has been created. I use sed for this purpose,\r\nthe command \"sed -e s/,//g infile > outfile\" creates outfile as a totally\r\ncomma-less copy of infile.\r\n

\r\n\r\n\r\n\r\n

PDB2ADR Distribution list setup:

\r\n\r\nSay, you often send emails to all of your family members, maybe to invite them to family meetings\r\nor to let them know all the news about your a few months old daughter.

\r\nThe most convenitent way to do this is to create a distribution list file for Post/LX, say, \"family.adr\",\r\ncontaining the email addresses of all your family members. PDB2ADR can create that file for you.\r\nJust assign all entries which shall be used to create \"family.adr\" in the built-in phone book\r\nto a (new) category named \"family\" for example.\r\n

\r\nThen GDBIO the phone book as described above, sort it as described above, create your\r\npost.adr as described above and, to create the family.adr, call PDB2ADR in addition that way:

\r\nPDB2ADR PHONES.CDF 1 8 0 3 family > family.adr\r\n

\r\nThis will make use of the \"category check\" feature and create family.adr containing only the plain\r\nnames and email addresses of those phone book entries\r\nwhich you added the category \"family\" to. The 5th parameter, which is 3 in my example,\r\nis the number of the column in the CDF file which holds the category names. Open PHONES.CDF\r\nwith a text editor and count which column contains the category to find out which value you\r\nhave to use here or use the GDBIO c:\\_dat\\phone.pdb /s command.\r\n

\r\nWhen the file has been created, you can compose your message in Post/LX as usual,\r\nfill your own email address\r\ninto the To: header, add a header \"BCC\" (blind carbon copy) by pressing F2, H and\r\nchoosing BCC:,\r\nand fill it with \"file:family.adr\".
\r\nYou could also write that into the To: header, but it is good style not to do this, because if\r\nyou did that,\r\nevery receipient of your email could read the email addresses of all other receipients.\r\nThis is an issue of data privacy protection.\r\n

\r\nPlease note that until version 1.5, PDB2ADR created distribution lists in the \\quot;simple\\quot;\r\nformat, i.e. exactly one email address per line.\r\nVersions 3.1 and later of Post/LX can handle the more complex distribution list format,\r\nwhich can either contain one email address per line or a name, followed by the email\r\naddress in the following format per line:
\r\nName <email@address.xy>, which is the usual format for the Post.adr file of Post/LX version 3.1 and above (not compatible with earlier Post/LX versions).\r\n

\r\nThe ALLCATEGORIES feature introduced with version 1.3 of PDB2ADR, is removed again for v2.0,\r\nbecause it is redundant now, since the normal post.adr, created with
\r\npdb2adr phone.cdf 1 8 0 0 0 > post.adr (for example) can be\r\nused as a distribution list for all phone book entries, at least in versions 3.1 or later\r\nof Post/LX.\r\n

\r\nAlso note that when creating distribution lists, the phone number column parameter\r\ndoesn´t have any effect, as no phone numbers are included in Post/LX distribution\r\nlists.\r\n\r\n\r\n

PDB2QLX setup:

\r\n\r\nPDB2QLX is a new component introduced in version 2.2 of the PDB2X collection.\r\nIt enables an automatic email address completion feature for email programs, such as\r\nPost/LX, Goin\' Postal and others.\r\n

\r\nIt does that by extracting the email addresses from the PDB (as PDB2ADR) and writing\r\nthe raw email addresses to the dictionary file of Quick/LX. Quick/LX is a program\r\nwritten by Andreas Garzotto and downloadable from D&A Software Homepage, which suggests completion of words during typing, based on a collection of words\r\nstored in a dictionary file. It can also be used for email addresses, not only for words,\r\nand that is what it is ued for here. PDB2QLX reads either all email addresses or only\r\nthose belonging to a specific category (e.g. QLX) from the PDB and appends them to\r\nthe Quick/LX dictionary file c:\\_dat\\quick.dat.

\r\nIf you then compose an email and write the beginning of an email address in quick.dat, Quick/LX\r\nsuggest the rest of the address and by pressing the right arrow key, you confirm and\r\nQuick/LX will enter the rest of the address. This is very handy to save time\r\nwith long email addresses and to avoid typos in the address. It is in most cases even\r\nfaster than to open the email client´s address book and pick the email address.

\r\nSee the example batch below for an example how PDB2QLX can be used. Detailed instructions\r\nare in the PDB2QLX.C file in the PDB2X.ZIP archive.\r\n\r\nThe following screenshot shows Quick/LX suggesting the address someone.else@gmx.de after\r\ntyping only som into the address filed of a new Post/LX email message:

\r\n

\r\n\r\nIn order to keep also the normal dictionary entries of the quick.dat file, it is necessary\r\nto do a little processing on each update of the file, not just delete it and let\r\nPDB2QLX write it anew, because PDB2QLX cannot keep the non-email entries of the file.\r\n\r\nSee the example batch below. It shows a solution using grep. \r\nThe line \r\n

\r\ngrep -v ^.*@.*\\..* c:\\_dat\\quick.dat > quick.tmp\r\n
\r\nlooks for email addresses in quick.dat of the format given in the regular expression.\r\nIt is a simple regexp, which should be sufficient here. It looks for an address\r\nof the format *@*.* (* beeing any number of any characters). The option -v\r\nlets grep find all lines not matching the regexp. So in quick.tmp there \r\nwill be the contents of the original quick.dat without the email addresses.

\r\n\r\nI only let PDB2QLX write some well chosen addresses to the quick.dat file which I need\r\nvery often. About 10-20 addresses are enough for me. Adding more addresses\r\nthan necessary blows up the quick.dat file and thus the amount of memory \r\nQuick/LX needs constantly. The category check feature of PDB2QLX allows you\r\nto select the addresses which should go into quick.dat by simply applying a\r\ncategory (e.g. QLX) to them and letting PDB2QLX only use these categorized addresses.\r\n\r\nNote that the batch which controls PDB2QLX needs to execute QSYNC after modifying the quick.dat\r\nfile, otherwise the changes of the file won´t have any effect.\r\n\r\n\r\n

PDB2PHN setup:

\r\n\r\nFor PDB2PHN you can use the same GDBIO-created input CDF file as for PDB2ADR, preferrably the\r\nsorted one (phone_s.cdf, see above).

\r\nCall PDB2PHN with the followig parameters:

\r\n1.: input file name
\r\n2.: name field number
\r\n3. to max. 7.: column numbers of phone number fields, where the first given field number has the\r\nhighest priority and the last given number has the lowest priority.
Priority means:\r\nPDB2PHN searches the given fields in the order you give them for a phone number.\r\nThe first number it finds is used. PDB2PHN can only create a file containing records which\r\nhave one phone number per name and only a phone number, nothing else.\r\nSo, if you have 4 phone number fields in your database, say, field 4 is the cell phone number, field 5 is\r\nthe business number, field 7 is the private number and field 9 is an alternative number. If you\r\nprefer to have the cell phone number in your cell phone´&s phone book, you could use\r\nthe following command line to call PDB2PHN:

\r\nPDB2PHN c:\\_tmp\\phone_s.cdf 1 4 7 5 8 > c:\\_tmp\\phonebk.txt

\r\n\r\nWell, this is only half the work done. You now have a file containing one name per line with\r\none phone number per name in the format Daniel Hertrich|+491771234567.
\r\nThis file has to be transferred to the cellular phone using WWW/LX and Robot/LX with the Robot script\r\n\"phone.scr\". Please download Robot/LX and phone.scr (comes with the SMS.ZIP package) from\r\nwww.dasoft.com/filelist.htm and read there about usage.\r\nIt can transfer whole phone books from and to your cellular phone over cable or over Infrared.\r\n\r\n\r\n\r\n

PDB2PIM setup:

\r\n\r\nPDB2PIM basically copies all contents of your phone.pdb file to a PIM/PE compatible file, i.e.\r\nit creates records looking like this:\r\n
\r\n+p Hertrich, Daniel\r\n   my.email@provider.de\r\n   +49 30 12345678\r\n   +49 177 1234567\r\n   Street address line 1\r\n   Street address line 2\r\n   ZIP code\r\n   City\r\n   Country\r\n   | Here are notes which you may have\r\n   | in your PDB file (created\r\n
\r\nIn order to be able to convert even the notes, you have to create a CDF file containing notes.\r\nThe GDBIO command line which you used for PDB2ADR and PDB2PHN doesn´t do this.\r\nSo, create a second CDF file from your PDB using:\r\n
\r\nGDBIO C:\\_DAT\\PHONE.PDB /X /N > C:\\_TMP\\PHONEN.CDF\r\n
\r\n\r\nNow you have a CDF file with notes. This is harder to sort than the other file without notes, but\r\nthere is a lolution for that. It basically appends every note line to the preceding\r\ndata line, so every line holds again exactly one record. So it is easy to sort.\r\nAfter sorting it has to be disassembled into the original lines again. All these modifications can\r\nbe done using SED, the stream editor. See the example batch file below how to call sed before and\r\nafter sorting! Many thanks to Michel Bel and Tony Hutchins for this smart solution!
\r\nIf you ever have problems with truncated notes, it may be that one of the programs used here (sed or\r\nbigsort or your favorite sort program which you use alternatively to bigsort) cannot handle\r\nvery long lines. Please see the example batch file at the end of this\r\nmage to see how this sorting mechanism works.\r\n

\r\nOnce the sorted CDF file is created, call PDB2PIM with the following parameters:

\r\n1. Input file name
\r\n2. record delimiter in output file (usually +p, must be 2 characters long and begin with +)
\r\n3. to max. 22.: Field numbers to be taken over to the PIM/PE file. No more than 20 fields can be used.
\r\nAnd don´t forget the redirection into the output file again.

\r\nThat´s all. PDB2PIM creates \"+. Contacts.pim\" as the first line of the output file, so\r\npim.exe doesn´t complain about the missing time stamp (although it actually isn´t\r\na time stamp ;-) ).\r\n\r\n\r\n\r\n

Example batch file for PDB2xxx:

\r\n\r\nI let my PDB2X.BAT run every night which creates everytime-up-to-date versions of all contact\r\ninformation for every purpose I need them for. I only have to care about my phone.pdb now!

\r\nPlease don´t use this batch as it is given here, you surely have to adjust paths and file\r\nnames and field numbers. This batch file is only provided here to\r\ngive you an idea how I use these tools.

\r\n\r\n

\r\n@echo off\r\n:: NEEDS: GDBIO, SED and the PDB2X utilities\r\n:: USES:  SYSLOG utility (not needed, but nice to have)\r\n\r\n:: =========== DUMP PDB FILE ============\r\n\r\necho GDBIO without notes...\r\ngdbio c:\\_dat\\phone.pdb > c:\\_tmp\\phone.cdf\r\nif errorlevel 1 syslog GDBIO1 ERROR\r\n\r\necho GDBIO with notes...\r\ngdbio c:\\_dat\\phone.pdb /N /X > c:\\_tmp\\phonen.cdf\r\nif errorlevel 1 syslog GDBIO2 ERROR\r\n\r\n:: =========== SORT DUMPED PDB FILES ============\r\n\r\necho Sorting phone.cdf with BIGSORT...\r\nbigsort /i < c:\\_tmp\\phone.cdf > c:\\_tmp\\phone_s.cdf\r\nif errorlevel 1 syslog BIGSORT1 ERROR\r\ndel c:\\_tmp\\phone.cdf\r\n\r\necho Sorting phonen.cdf with SED and BIGSORT...\r\n\r\nrem This sorting algorithm is quite sophisticated:\r\nrem 1. sed puts all lines of an entry into one single line,\r\nrem    and puts the marker @~@ between them.\r\nrem 2. bigsort sorts the resulting file line by line\r\nrem 3. sed disassembles the lines again by looking for @~@ and\r\nrem    replacing that pattern with a line break again.\r\n\r\nsed -e :a -e \"$!N;s/\\nN/@~@N/;ta\" -e \"P;D\" c:\\_tmp\\phonen.cdf > c:\\_tmp\\phonen.tmp\r\nbigsort.exe /i < c:\\_tmp\\phonen.tmp > c:\\_tmp\\phonen_s.tmp\r\nif errorlevel 1 syslog BIGSORT2 ERROR\r\nsed \"s/@~@N/\\nN/g\" c:\\_tmp\\phonen_s.tmp > c:\\_tmp\\phonen_s.cdf\r\ndel c:\\_tmp\\phonen.cdf\r\ndel c:\\_tmp\\phonen.tmp\r\ndel c:\\_tmp\\phonen_s.tmp\r\n\r\n:: =========== CREATE Post/LX ADDRESS LISTS ============\r\n\r\necho PDB2ADR... Email.ADR (main email address book)\r\ndel c:\\dfu\\wwwlx\\adr\\email.adr\r\nPDB2ADR c:\\_tmp\\phone_s.cdf 1 8 0 0 0 > c:\\dfu\\wwwlx\\adr\\email.tmp\r\nif errorlevel 1 syslog PDB2ADR1 ERROR (email.adr)\r\necho. >> c:\\dfu\\wwwlx\\adr\\email.tmp\r\necho ============ END OF AUTOMATICALLY CREATED EMAIL.ADR ============ >> c:\\dfu\\wwwlx\\adr\\email.tmp\r\nREM REMOVE COMMAS:\r\nsed -e \"s/,//g\" c:\\dfu\\wwwlx\\adr\\email.tmp > c:\\dfu\\wwwlx\\adr\\email.adr\r\ndel c:\\dfu\\wwwlx\\adr\\email.tmp\r\n\r\necho.\r\n\r\necho PDB2ADR... SMS.ADR (contains phone numbers for SMS delivery)\r\ndel c:\\dfu\\wwwlx\\adr\\sms.adr\r\nPDB2ADR c:\\_tmp\\phone_s.cdf 1 0 6 0 0 > c:\\dfu\\wwwlx\\adr\\sms.tmp\r\nif errorlevel 1 syslog PDB2ADR1a ERROR (sms.adr)\r\nREM REMOVE COMMAS:\r\nsed -e \"s/,//g\" c:\\dfu\\wwwlx\\adr\\sms.tmp > c:\\dfu\\wwwlx\\adr\\sms.adr\r\ndel c:\\dfu\\wwwlx\\adr\\sms.tmp\r\n\r\necho.\r\n\r\necho PDB2ADR... ABI97.ADR (an Post/LX distribution list based on category check)\r\ndel c:\\dfu\\wwwlx\\adr\\abi97.adr\r\nPDB2ADR c:\\_tmp\\phone_s.cdf 1 8 0 3 Abi > c:\\dfu\\wwwlx\\adr\\abi97.tmp\r\nif errorlevel 1 syslog PDB2ADR2 ERROR (abi97.adr)\r\nREM REMOVE COMMAS:\r\nsed -e \"s/,//g\" c:\\dfu\\wwwlx\\adr\\abi97.tmp > c:\\dfu\\wwwlx\\adr\\abi97.adr\r\ndel c:\\dfu\\wwwlx\\adr\\abi97.tmp\r\ncopy c:\\dfu\\wwwlx\\adr\\abi97.adr a:\\_dat\\wwwlx\r\n\r\necho.\r\n\r\n;; =========== CREATE QUICK/LX ADDRESSES ==============\r\n\r\necho PDB2QLX... \r\n\r\nREM Remove email addresses from quick.dat:\r\ngrep -v ^.*@.*\\..* c:\\_dat\\quick.dat > quick.tmp\r\ndel c:\\_dat\\quick.dat\r\nmove quick.tmp c:\\_dat\\quick.dat\r\nc:\\bin\\qsync\r\n\r\nREM Add email addresses to quick.dat (using category QLX in the PDB):\r\nPDB2QLX c:\\_tmp\\phone_s.cdf 8 3 QLX >> c:\\_dat\\quick.dat\r\nc:\\bin\\qsync\r\n\r\necho.\r\n:: =========== CREATE CELL PHONE PHONEBOOK FIILE ============\r\n\r\necho PDB2PHN... PHONEMEM.TXT\r\nif exist c:\\_dat\\phonemem.txt del c:\\_dat\\phonemem.txt\r\nPDB2PHN c:\\_tmp\\phone_s.cdf 1 6 5 4 7 > c:\\_dat\\phonemem.txt\r\nif errorlevel 1 syslog PDB2PHN ERROR\r\n\r\necho.\r\n\r\n:: =========== CREATE PIM CONTACTS FILE ============\r\n\r\necho PDB2PIM...\r\nif exist c:\\_dat\\pim\\data\\contacts.pim del c:\\_dat\\pim\\data\\contacts.pim\r\nPDB2PIM c:\\_tmp\\phonen_s.cdf +p 1 2 3 4 5 6 7 9 8 10 11 12 13 14 > c:\\_dat\\pim\\data\\contacts.pim\r\nif errorlevel 1 syslog PDB2PIM ERROR\r\n\r\n\r\n:end\r\necho CLEANING UP...\r\ndel c:\\_tmp\\phone_s.cdf\r\ndel c:\\_tmp\\phonen_s.cdf\r\necho FINISHED!\r\necho.\r\n
\";s:8:\"fulltext\";s:0:\"\";s:5:\"state\";s:1:\"1\";s:9:\"sectionid\";s:1:\"1\";s:4:\"mask\";s:1:\"0\";s:5:\"catid\";s:1:\"2\";s:7:\"created\";s:19:\"2009-10-22 10:53:33\";s:10:\"created_by\";s:2:\"62\";s:16:\"created_by_alias\";s:0:\"\";s:8:\"modified\";s:19:\"2009-10-22 11:23:48\";s:11:\"modified_by\";s:2:\"62\";s:11:\"checked_out\";s:1:\"0\";s:16:\"checked_out_time\";s:19:\"0000-00-00 00:00:00\";s:10:\"publish_up\";s:19:\"2009-10-22 10:53:33\";s:12:\"publish_down\";s:19:\"0000-00-00 00:00:00\";s:6:\"images\";s:0:\"\";s:4:\"urls\";s:0:\"\";s:7:\"attribs\";s:231:\"show_title=\nlink_titles=\nshow_intro=\nshow_section=\nlink_section=\nshow_category=\nlink_category=\nshow_vote=\nshow_author=\nshow_create_date=\nshow_modify_date=\nshow_pdf_icon=\nshow_print_icon=\nshow_email_icon=\nlanguage=\nkeyref=\nreadmore=\";s:7:\"version\";s:1:\"2\";s:8:\"parentid\";s:1:\"0\";s:8:\"ordering\";s:1:\"5\";s:7:\"metakey\";s:95:\"100LX, 200LX, synchronize, PDB, ADR, PDB2ADR, phone book, post/lx, address book, export, import\";s:8:\"metadesc\";s:0:\"\";s:6:\"access\";s:1:\"0\";s:4:\"hits\";s:4:\"2190\";s:8:\"metadata\";s:15:\"robots=\nauthor=\";s:6:\"author\";s:22:\"hermocom Administrator\";s:8:\"usertype\";s:19:\"Super Administrator\";s:8:\"category\";s:4:\"HPLX\";s:7:\"section\";s:7:\"Website\";s:4:\"slug\";s:8:\"65:pdb2x\";s:7:\"catslug\";s:6:\"2:hplx\";s:6:\"groups\";s:6:\"Public\";s:7:\"sec_pub\";s:1:\"1\";s:7:\"cat_pub\";s:1:\"1\";s:10:\"sec_access\";s:1:\"0\";s:10:\"cat_access\";s:1:\"0\";}}}'))
PDB2X - Synchronize your HP 100/200LX Telephone book data to the Post/LX address book, cellphone address book, PIM/PE... Print
Contents of this page:

Introduction:

Do you use the email software Post/LX by D&A Software?
Do you also keep two email address books on your Plamtop? One as the built-in phone book and another in Post/LX as "post.adr"?

If yes, PDB2ADR may be interesting for you.

There are two ways to automatically create a post.adr from your built-in phone book. One way is to use a smart clip inside the phone book. This method is described behind this link.

Another more comfortable way is to use the program pdb2adr, which is described and available here. With PDB2ADR you can even export mobile phone numbers from the built-in phone book to post.adr for use to send SMS messages with your mobile phone out of Post/LX in conjuction with Stefan Peichl´s PDU (read my mobile Internet page to learn more about this).

In addition, PDB2ADR lets you create your Post/LX distribution list files (*.adr) automatically.

PDB2PHN, which is also included in the PDB2X package, lets you transfer your whole HPLX phone book (only names with one phone number for each name) to your cellular phone. You need Robot/LX and a registered version of WWW/LX for that.

Last but not least, PDB2PIM converts the HPLX phone book to a PIM/PE compatible database format. This is useful if you either want to migrate the built-in phone book entirely to PIM/PE, or if you still use the built-in one as your standard (as I do) and use PIM/PE additionally, so PDB2PIM lets you synchronize both with one batch file call.

I have a batch file called pdb2x.bat which uses all three programs to synchronize my HPLX phone book every night (the batch is called by the appointment book) to PIM, cellphone and Post/LX.

Requirements and Download:

In order to use the programs from the PDB2X package, you need of course a phone book file on your palmtop (usually c:\_dat\phone.pdb). PDB2ADR is needed if you want to synchronize your PDB data with the Post/LX address book. And for PDB2PHN (PDB data synchronisation to the mobile phone's address book) you need WWW/LX in order to establish a connection to your mobile phone.

Other requirements:

  • GDBIO which dumps your phone.pdb into a comma seperated value file and thus prepares your phone boook for use with PDB2X

  • The PDB2X package (download see below) which extracts the relevant data and puts them to stdout (redirect it into the output file!)

  • BIGSORT v2.2 by Turgut Kalfaoglu, if you prefer sorted output

  • SED, the strem editor, for MS-DOS is also needed to sort the full phone book with notes in CDF format. You don´t need it if you don´t want sorted output.
The PDB2xxx.EXE binaries, SED and BIGSORT are considered to be installed somewhere in your PATH in the following description. If they are in a directory not accessable through your PATH, please give explicit paths in the batch file(s).
 Download PDB2X
File Title: PDB2X (Details)
File Type: zip
File Version: 2.2
File Size: 54.93 Kb
Downloads: 71

PDB2ADR: Standard setup:

Go to DOS on your LX, create a directory c:\_tmp\ (md c:\_tmp) and do a

gdbio c:\_dat\phone.pdb > c:\_tmp\phone.cdf.

This creates a first comma seperated value file from your phone book which you need to figure out the correct parameters for PDB2ADR.
Open the phone.cdf file in your favorite text editor (preferrably without line wrapping) and search for an entry that has an email address and, if you want to export them too, a mobile phone number.
Such an entry should look like (for example)

"Hertrich, Daniel","","private","","+491231234567","+491212345678",""," This e-mail address is being protected from spambots. You need JavaScript enabled to view it ","addressline1","addressline2","",""
Now you have to count in which column which relevant entry is. You need: Name, email address and perhaps the mobile phone number, depending on if you want to send SMSs with Post/LX or not.
Let´s count in my example:
The name is in column 1 (this is most likely also the case in your cdf file).
The email address is in column 8 (you also have to count empty columns (""))
The mobile phone number is in column 5 (+491231234567).

These column associations are the same for every entry.

Now call PDB2ADR this way:

pdb2adr phone.cdf 1 8 5 0 0 > test.adr

and see if test.adr contains the email addresses and phone numbers in the correct format.

(Alternatively, you can call GDBIO once with the /S parameter, which shows the structure of your database. I.e. the output of GDBIO C:\_DAT\PHONE.PDB /S should show you the field numbers you need, so you don´t need to count. ;-) )

Explanation of the PDB2ADR parameters:
1. input file name, must be comma seperated values file, created with GDBIO from the phone book
2. field number of names
3. field number of email addresses
4. field number of mobile phone numbers
5. field number of category names (see description below)
6. category name if 5th parameter not equal 0, otherwise "0". (see description below)
post.adr means rediretion of the output to the file post.adr. If you leave away the redirection, output is shown on the screen, which is only useful for debugging purposes.

If you don´t want phone numbers to be exported, give a 0 as field number for phone numbers, i.e. pdb2adr phone.cdf 1 8 0 0 0 > test.adr.
You can also give a 0 for the email field, then you won´t get email addresses in your resulting file.

The email addresses are exported in the format
Hertrich, Daniel < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >
and the phone numbers are exported in the format
+491231234567 | Hertrich, Daniel

Please note that email addresses and phone numbers themselves are exported exactly as you enetered them into the phone book, i.e. you have to enter all phone numbers in a format that PDU can directly use. Up to version 2.0, PDU doesn't tolerate any other characters than numbers (even space is not allowed). I asked Stefan Peichl if he could make PDU more tolerant and he did it! Thanks! The new PDU versions (since 2.1, download here) now accepts spaces ( ), dot (.), minus (-), slash (/) and parentheses (()) within a mobile phone number. And of course still the plus at the beginning. So you don´t have to modify all your phone book entries which contained non-number characters for better readability.

So a number like +49.177.1234567 or (0177) 123 45 67 or +49/177-123.45.67 is now accepted.
But be aware that something like +49 (0)177 1234567 will not work, if the 0 between the parentheses is optional, depending on the country code (+49) to be dialed or not. I don´t know if it is also the case in other countries, but here in Germany you have to dial a 0 before a long-distance call but if you dial in from outside Germany using the country code, you must not dial the 0. In the given example, PDU would dial the country code and the zero.

Every email address field in your phone book has to hold just one email address in the usual format name@domain. Nothing else. Otherwise Post/LX will not be able to make use of the entry in post.adr.

Entries with empty email address fields will not be converted into the email address section of the output of PDB2ADR, and entries without mobile phone number will not be taken into the phone number section.

If your test.adr looks good, you can make a backup copy of your original post.adr and let PDB2ADR instead create your post.adr. You even can write a batch file which does that automatically, maybe every night, invoked by the appointment book at 2am, like I do. See a sample batch file for all PDB2xxx programs below!

If you prefer sorted output (the phone.cdf file is not alphabetically sorted!), you have to use a sorting program and run it over the cdf file. I found a program called BIGSORT, written by Turgut Kalfaoglu from Turkey. It is very fast and easy to use. Link see in section "Requirements". Call BIGSORT with the parameter /i, so that it is case insensitive, and redirect its output to a another cdf file, for example phone_s.cdf. Then let PDB2ADR process that sorted file.

If you use commas in your PDB as a delimiter between last and first name ("Hertrich, Daniel" for example), you may have problems with Post/LX as it sees a comma in the To: field as a delimiter between different destinations. To avoid these problems, you should remove all commas from your post.adr file after it has been created. I use sed for this purpose, the command "sed -e s/,//g infile > outfile" creates outfile as a totally comma-less copy of infile.

PDB2ADR Distribution list setup:

Say, you often send emails to all of your family members, maybe to invite them to family meetings or to let them know all the news about your a few months old daughter.

The most convenitent way to do this is to create a distribution list file for Post/LX, say, "family.adr", containing the email addresses of all your family members. PDB2ADR can create that file for you. Just assign all entries which shall be used to create "family.adr" in the built-in phone book to a (new) category named "family" for example.

Then GDBIO the phone book as described above, sort it as described above, create your post.adr as described above and, to create the family.adr, call PDB2ADR in addition that way:

PDB2ADR PHONES.CDF 1 8 0 3 family > family.adr

This will make use of the "category check" feature and create family.adr containing only the plain names and email addresses of those phone book entries which you added the category "family" to. The 5th parameter, which is 3 in my example, is the number of the column in the CDF file which holds the category names. Open PHONES.CDF with a text editor and count which column contains the category to find out which value you have to use here or use the GDBIO c:\_dat\phone.pdb /s command.

When the file has been created, you can compose your message in Post/LX as usual, fill your own email address into the To: header, add a header "BCC" (blind carbon copy) by pressing F2, H and choosing BCC:, and fill it with "file:family.adr".
You could also write that into the To: header, but it is good style not to do this, because if you did that, every receipient of your email could read the email addresses of all other receipients. This is an issue of data privacy protection.

Please note that until version 1.5, PDB2ADR created distribution lists in the \quot;simple\quot; format, i.e. exactly one email address per line. Versions 3.1 and later of Post/LX can handle the more complex distribution list format, which can either contain one email address per line or a name, followed by the email address in the following format per line:
Name < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >, which is the usual format for the Post.adr file of Post/LX version 3.1 and above (not compatible with earlier Post/LX versions).

The ALLCATEGORIES feature introduced with version 1.3 of PDB2ADR, is removed again for v2.0, because it is redundant now, since the normal post.adr, created with
pdb2adr phone.cdf 1 8 0 0 0 > post.adr (for example) can be used as a distribution list for all phone book entries, at least in versions 3.1 or later of Post/LX.

Also note that when creating distribution lists, the phone number column parameter doesn´t have any effect, as no phone numbers are included in Post/LX distribution lists.

PDB2QLX setup:

PDB2QLX is a new component introduced in version 2.2 of the PDB2X collection. It enables an automatic email address completion feature for email programs, such as Post/LX, Goin' Postal and others.

It does that by extracting the email addresses from the PDB (as PDB2ADR) and writing the raw email addresses to the dictionary file of Quick/LX. Quick/LX is a program written by Andreas Garzotto and downloadable from D&A Software Homepage, which suggests completion of words during typing, based on a collection of words stored in a dictionary file. It can also be used for email addresses, not only for words, and that is what it is ued for here. PDB2QLX reads either all email addresses or only those belonging to a specific category (e.g. QLX) from the PDB and appends them to the Quick/LX dictionary file c:\_dat\quick.dat.

If you then compose an email and write the beginning of an email address in quick.dat, Quick/LX suggest the rest of the address and by pressing the right arrow key, you confirm and Quick/LX will enter the rest of the address. This is very handy to save time with long email addresses and to avoid typos in the address. It is in most cases even faster than to open the email client´s address book and pick the email address.

See the example batch below for an example how PDB2QLX can be used. Detailed instructions are in the PDB2QLX.C file in the PDB2X.ZIP archive. The following screenshot shows Quick/LX suggesting the address This e-mail address is being protected from spambots. You need JavaScript enabled to view it after typing only som into the address filed of a new Post/LX email message:

In order to keep also the normal dictionary entries of the quick.dat file, it is necessary to do a little processing on each update of the file, not just delete it and let PDB2QLX write it anew, because PDB2QLX cannot keep the non-email entries of the file. See the example batch below. It shows a solution using grep. The line

grep -v ^.*@.*\..* c:\_dat\quick.dat > quick.tmp
looks for email addresses in quick.dat of the format given in the regular expression. It is a simple regexp, which should be sufficient here. It looks for an address of the format *@*.* (* beeing any number of any characters). The option -v lets grep find all lines not matching the regexp. So in quick.tmp there will be the contents of the original quick.dat without the email addresses.

I only let PDB2QLX write some well chosen addresses to the quick.dat file which I need very often. About 10-20 addresses are enough for me. Adding more addresses than necessary blows up the quick.dat file and thus the amount of memory Quick/LX needs constantly. The category check feature of PDB2QLX allows you to select the addresses which should go into quick.dat by simply applying a category (e.g. QLX) to them and letting PDB2QLX only use these categorized addresses. Note that the batch which controls PDB2QLX needs to execute QSYNC after modifying the quick.dat file, otherwise the changes of the file won´t have any effect.

PDB2PHN setup:

For PDB2PHN you can use the same GDBIO-created input CDF file as for PDB2ADR, preferrably the sorted one (phone_s.cdf, see above).

Call PDB2PHN with the followig parameters:

1.: input file name
2.: name field number
3. to max. 7.: column numbers of phone number fields, where the first given field number has the highest priority and the last given number has the lowest priority.
Priority means: PDB2PHN searches the given fields in the order you give them for a phone number. The first number it finds is used. PDB2PHN can only create a file containing records which have one phone number per name and only a phone number, nothing else. So, if you have 4 phone number fields in your database, say, field 4 is the cell phone number, field 5 is the business number, field 7 is the private number and field 9 is an alternative number. If you prefer to have the cell phone number in your cell phone´&s phone book, you could use the following command line to call PDB2PHN:

PDB2PHN c:\_tmp\phone_s.cdf 1 4 7 5 8 > c:\_tmp\phonebk.txt

Well, this is only half the work done. You now have a file containing one name per line with one phone number per name in the format Daniel Hertrich|+491771234567.
This file has to be transferred to the cellular phone using WWW/LX and Robot/LX with the Robot script "phone.scr". Please download Robot/LX and phone.scr (comes with the SMS.ZIP package) from www.dasoft.com/filelist.htm and read there about usage. It can transfer whole phone books from and to your cellular phone over cable or over Infrared.

PDB2PIM setup:

PDB2PIM basically copies all contents of your phone.pdb file to a PIM/PE compatible file, i.e. it creates records looking like this:
+p Hertrich, Daniel
   
 This e-mail address is being protected from spambots. You need JavaScript enabled to view it
 
   +49 30 12345678
   +49 177 1234567
   Street address line 1
   Street address line 2
   ZIP code
   City
   Country
   | Here are notes which you may have
   | in your PDB file (created
In order to be able to convert even the notes, you have to create a CDF file containing notes. The GDBIO command line which you used for PDB2ADR and PDB2PHN doesn´t do this. So, create a second CDF file from your PDB using:
GDBIO C:\_DAT\PHONE.PDB /X /N > C:\_TMP\PHONEN.CDF
Now you have a CDF file with notes. This is harder to sort than the other file without notes, but there is a lolution for that. It basically appends every note line to the preceding data line, so every line holds again exactly one record. So it is easy to sort. After sorting it has to be disassembled into the original lines again. All these modifications can be done using SED, the stream editor. See the example batch file below how to call sed before and after sorting! Many thanks to Michel Bel and Tony Hutchins for this smart solution!
If you ever have problems with truncated notes, it may be that one of the programs used here (sed or bigsort or your favorite sort program which you use alternatively to bigsort) cannot handle very long lines. Please see the example batch file at the end of this mage to see how this sorting mechanism works.

Once the sorted CDF file is created, call PDB2PIM with the following parameters:

1. Input file name
2. record delimiter in output file (usually +p, must be 2 characters long and begin with +)
3. to max. 22.: Field numbers to be taken over to the PIM/PE file. No more than 20 fields can be used.
And don´t forget the redirection into the output file again.

That´s all. PDB2PIM creates "+. Contacts.pim" as the first line of the output file, so pim.exe doesn´t complain about the missing time stamp (although it actually isn´t a time stamp ;-) ).

Example batch file for PDB2xxx:

I let my PDB2X.BAT run every night which creates everytime-up-to-date versions of all contact information for every purpose I need them for. I only have to care about my phone.pdb now!

Please don´t use this batch as it is given here, you surely have to adjust paths and file names and field numbers. This batch file is only provided here to give you an idea how I use these tools.

@echo off
:: NEEDS: GDBIO, SED and the PDB2X utilities
:: USES:  SYSLOG utility (not needed, but nice to have)

:: =========== DUMP PDB FILE ============

echo GDBIO without notes...
gdbio c:\_dat\phone.pdb > c:\_tmp\phone.cdf
if errorlevel 1 syslog GDBIO1 ERROR

echo GDBIO with notes...
gdbio c:\_dat\phone.pdb /N /X > c:\_tmp\phonen.cdf
if errorlevel 1 syslog GDBIO2 ERROR

:: =========== SORT DUMPED PDB FILES ============

echo Sorting phone.cdf with BIGSORT...
bigsort /i < c:\_tmp\phone.cdf > c:\_tmp\phone_s.cdf
if errorlevel 1 syslog BIGSORT1 ERROR
del c:\_tmp\phone.cdf

echo Sorting phonen.cdf with SED and BIGSORT...

rem This sorting algorithm is quite sophisticated:
rem 1. sed puts all lines of an entry into one single line,
rem    and puts the marker @~@ between them.
rem 2. bigsort sorts the resulting file line by line
rem 3. sed disassembles the lines again by looking for @~@ and
rem    replacing that pattern with a line break again.

sed -e :a -e "$!N;s/\nN/@~@N/;ta" -e "P;D" c:\_tmp\phonen.cdf > c:\_tmp\phonen.tmp
bigsort.exe /i < c:\_tmp\phonen.tmp > c:\_tmp\phonen_s.tmp
if errorlevel 1 syslog BIGSORT2 ERROR
sed "s/@~@N/\nN/g" c:\_tmp\phonen_s.tmp > c:\_tmp\phonen_s.cdf
del c:\_tmp\phonen.cdf
del c:\_tmp\phonen.tmp
del c:\_tmp\phonen_s.tmp

:: =========== CREATE Post/LX ADDRESS LISTS ============

echo PDB2ADR... Email.ADR (main email address book)
del c:\dfu\wwwlx\adr\email.adr
PDB2ADR c:\_tmp\phone_s.cdf 1 8 0 0 0 > c:\dfu\wwwlx\adr\email.tmp
if errorlevel 1 syslog PDB2ADR1 ERROR (email.adr)
echo. >> c:\dfu\wwwlx\adr\email.tmp
echo ============ END OF AUTOMATICALLY CREATED EMAIL.ADR ============ >> c:\dfu\wwwlx\adr\email.tmp
REM REMOVE COMMAS:
sed -e "s/,//g" c:\dfu\wwwlx\adr\email.tmp > c:\dfu\wwwlx\adr\email.adr
del c:\dfu\wwwlx\adr\email.tmp

echo.

echo PDB2ADR... SMS.ADR (contains phone numbers for SMS delivery)
del c:\dfu\wwwlx\adr\sms.adr
PDB2ADR c:\_tmp\phone_s.cdf 1 0 6 0 0 > c:\dfu\wwwlx\adr\sms.tmp
if errorlevel 1 syslog PDB2ADR1a ERROR (sms.adr)
REM REMOVE COMMAS:
sed -e "s/,//g" c:\dfu\wwwlx\adr\sms.tmp > c:\dfu\wwwlx\adr\sms.adr
del c:\dfu\wwwlx\adr\sms.tmp

echo.

echo PDB2ADR... ABI97.ADR (an Post/LX distribution list based on category check)
del c:\dfu\wwwlx\adr\abi97.adr
PDB2ADR c:\_tmp\phone_s.cdf 1 8 0 3 Abi > c:\dfu\wwwlx\adr\abi97.tmp
if errorlevel 1 syslog PDB2ADR2 ERROR (abi97.adr)
REM REMOVE COMMAS:
sed -e "s/,//g" c:\dfu\wwwlx\adr\abi97.tmp > c:\dfu\wwwlx\adr\abi97.adr
del c:\dfu\wwwlx\adr\abi97.tmp
copy c:\dfu\wwwlx\adr\abi97.adr a:\_dat\wwwlx

echo.

;; =========== CREATE QUICK/LX ADDRESSES ==============

echo PDB2QLX... 

REM Remove email addresses from quick.dat:
grep -v ^.*@.*\..* c:\_dat\quick.dat > quick.tmp
del c:\_dat\quick.dat
move quick.tmp c:\_dat\quick.dat
c:\bin\qsync

REM Add email addresses to quick.dat (using category QLX in the PDB):
PDB2QLX c:\_tmp\phone_s.cdf 8 3 QLX >> c:\_dat\quick.dat
c:\bin\qsync

echo.
:: =========== CREATE CELL PHONE PHONEBOOK FIILE ============

echo PDB2PHN... PHONEMEM.TXT
if exist c:\_dat\phonemem.txt del c:\_dat\phonemem.txt
PDB2PHN c:\_tmp\phone_s.cdf 1 6 5 4 7 > c:\_dat\phonemem.txt
if errorlevel 1 syslog PDB2PHN ERROR

echo.

:: =========== CREATE PIM CONTACTS FILE ============

echo PDB2PIM...
if exist c:\_dat\pim\data\contacts.pim del c:\_dat\pim\data\contacts.pim
PDB2PIM c:\_tmp\phonen_s.cdf +p 1 2 3 4 5 6 7 9 8 10 11 12 13 14 > c:\_dat\pim\data\contacts.pim
if errorlevel 1 syslog PDB2PIM ERROR


:end
echo CLEANING UP...
del c:\_tmp\phone_s.cdf
del c:\_tmp\phonen_s.cdf
echo FINISHED!
echo.
Last Updated on Thursday, 22 October 2009
 
Newsletter
Subscribe to the hermocom email newsletter, if you would like to be informed about project status and software updates.



Poll
What do you consider the most important feature of an ultramobile computer?
 
hermocom login