{"id":154,"date":"2013-12-19T17:11:59","date_gmt":"2013-12-20T01:11:59","guid":{"rendered":"http:\/\/www.isam.ca\/d7\/?page_id=154"},"modified":"2013-12-19T19:20:13","modified_gmt":"2013-12-20T03:20:13","slug":"reference-files","status":"publish","type":"page","link":"https:\/\/www.isam.ca\/?page_id=154","title":{"rendered":"DISAM Reference Files"},"content":{"rendered":"<p><script>\n  var ajax_url = \"https:\/\/www.isam.ca\/wp-admin\/admin-ajax.php?action\"\n<\/script>\n\t\n\n<style type=\"text\/css\" media=\"screen\">\n.post_content_opened #post_title2 {\n  background-color:#283839!important;\n  border-color:#283841!important;\n}\n#content2{\nwidth: 600px;\n}\n#post_title2 {\nheight: 30px!important;\nwidth: 540px;\nborder-style: none;\nborder-top-style:;\nborder-right-style:;\nborder-width:px;\nborder-color:#FFFFFF;\nbackground-size: ;\nbackground-repeat:no-repeat;\nborder-radius:5px;\nbackground-color:#283841;\ndisplay:table;\n}\t\n\n#tchangeimg2{\ndisplay: table-cell;\nvertical-align: middle;\nwidth: auto;\n}\n\n#tchangeimg2 img{\n\t\n\nmax-width: none\n}\n\n#post_title2 #tchangeimg2 img{\nmargin-left:px;\n}\n\n#post_title2:hover{\n background-color:#283839!important ;\n}\n#date_user2{\nwidth:100%;\nheight:px;\nmargin-left:px;\nfont-size:14px;\ncolor:#969494;\nbackground-color:#DAD7D7;\nborder-style:none;\nborder-width:px;\nborder-color:#FFFFFF;\nborder-radius:px;\nborder-top-style:none;\nborder-bottom-style:none;\ndisplay: inline-table;\n}\n#date2 img\n{\nbox-shadow:none  !important;\npadding-right:3px  !important;\npadding-bottom:2px  !important;\npadding-top:0px  !important;\npadding-left:3px  !important;\nfloat:none !important;\nvertical-align:middle  !important;\n}\n#user2 img\n{\nfloat:none !important;\nbox-shadow:none !important;\npadding:2px !important;\npadding-left:4px !important;\nvertical-align:middle !important;\n}\ndiv.like_hits2{\nwidth:98%;\nbackground-color:#F5F3EB;\nmargin-left:5px;\nfont-size:14px;\nborder-style:none;\nborder-width:1px;\nborder-color:#DAD7D7;\nborder-radius:px;\nborder-top-style:solid;\nborder-bottom-style:none;\ncolor:#969494;\ndisplay: inline-table;\n}\nspan.like_hits_span\n{\ndisplay:table-cell;\nwidth:50%;\ntext-align:right;\npadding:4px;\n}\nimg.like_img{\nbox-shadow:none !important;\nfloat:none !important;\npadding:0px !important;\nvertical-align:top !important;\nmargin-right:2px !important;\ncursor:pointer !important;\n}\nimg.unlike_img{\nvertical-align: bottom !important;\nbox-shadow:none !important;\nfloat:none !important;\npadding:0px !important;\nmargin-right:2px !important;\ncursor:pointer !important;\n}\nspan.sentences\n{\npadding-left:3px\n}\n#date2{\ndisplay: table-cell;\ntext-align: right;\npadding-right: 4px;\nwidth:auto;\n}\nspan.likeimg\n{\nborder-right-style: solid;\nborder-width: 1px;\nborder-color: #737373;\nmargin-right: 6px;\npadding-right: 6px;\n}\n#ttext2{\nwidth:92%;\npadding-left:10px;\nfont-size:18px;\ncolor:#FFFFFF;\ndisplay: table-cell;\nvertical-align: middle;\nfont-family: sans-serif !important;\n}\n\n#post_content_wrapper2 {\nwidth: 525px;\nborder-style: none;\nborder-right-style: ;\nborder-width:px;\nborder-color:#FFFFFF;\nbackground-size: ;\nborder-radius:px;\npadding:px;\n}\n#post_right2 {\nwidth:520px;\n}\ndiv.number2{\nfont-size:  px;\ncolor:  #;\ndisplay: table-cell;\nfont-family: fantasy;\nwidth: 10px;\nfont-family: sans-serif !important;\n}\t\n.post_content_wrapper #imgbefore2 img{\nwidth: px;\nheight: px;\nmargin-top:;\n}\n\n.post_content_wrapper #imgafter2 img {\nwidth: px;\nheight: px;\nmargin-top:;\n}\n\t\n#atext2 p{\nmargin:0px;\nfont-size:14px!important;\n}\n\n#atext2 a{\ncolor:#1982d1 !important;\n}\n\n#atext2 a:hover{\ncolor:#1982d1 !important;\n}\n\na{\ncolor:#1982d1;\n}\n\n#atext2{\npadding:;\nfont-size:14px;\ncolor:#000000;\n}\t\n\n\n#searchform2{\nmargin:;\t\n}\n\n.searchform #skey2 {\nbackground-color: #EBEBEB !important;\npadding:0px;\noutline: none;\nheight: 24px !important;\nwidth:195px !important;\nborder: none;\n\/\/display: block;\n\/\/position:absolute;\n\/\/right:6%;\n\/\/bottom: 40%;\npadding-left:4px!important;\n}\n\n.searchform #srbuts2  {\n\/\/bottom: 40%;\n\/\/right:10% !important;\nbackground-image: url('https:\/\/www.isam.ca\/wp-content\/plugins\/spider-faq\/images\/search-faq.png') !important;\nwidth: 24px !important;\nheight: 24px !important;\nbackground-size: 100% 100%;\n\/\/position:absolute;\nbackground-repeat: no-repeat;\nborder: 0px;\ncursor: pointer;\nmargin-right: 0px !important;\nmargin-top:0px !important;\nmargin-bottom:0px !important;\noutline: none !important;\npadding:0px !important;\nbackground-color:transparent;\n}\n.searchform #srresbuts2  {\n\/\/bottom: 40%;\n\/\/right: 6% !important;\n\/\/position:absolute;\nwidth:24px;\nheight:24px;\nbackground-repeat: no-repeat;\nbackground-image:url('https:\/\/www.isam.ca\/wp-content\/plugins\/spider-faq\/images\/reset-faq.png') !important;\nbackground-size: 100% 100%;\nborder: 0px;\ncursor: pointer;\noutline: none;\nmargin-top:0px !important;\nmargin-bottom:0px !important;\npadding:0px !important;\nbackground-color:transparent;\n}\n\n.sp_search_reset\n{\n\twidth: 51px;\n    float: right;\n    position: relative;\n    left: -56px;\n}\n\n\n\n\n#cattitle2\t{\nbackground-color: #BDBDBD;\n\ncolor: #FFFFFF;\nfont-size:20px;\npadding:11px;\nmargin:1px 37px 1px 1px;\nborder-radius:5px;\nborder-style: none;\nborder-width:px;\nborder-color:#FFFFFF;\n}\n\t\n#catdes2{\nbackground-color: #E7E7E7;\n\ncolor: #000000;\nfont-size:px;\nmargin:10px 90px 14px 30px;\t\npadding:10px;\nborder-radius:5px;\nborder-style: none;\nborder-width:px;\nborder-color:#FFFFFF;\n}\t\n\t\n\ta.post_exp, a.post_coll, #post_expcol2 {\ncolor:#000000 ;\nfont-size:14px;\ntext-decoration: none;\ncursor:pointer;\n}\n\na.post_exp:hover, a.post_coll:hover, #post_expcol2:hover {\ncolor:#CCCCCC !important;\nbackground:none !important;\ntext-decoration: none;\ncursor:pointer;\n}\n\n.expcoll, #expcol2 {\nmargin:10px 40px 14px 0px;\ncolor:#000000 ;\n}\n\na.more-link, #more-link2{\ncolor:#283841 !important; \nfont-size:12px !important; \ntext-decoration: none;\ncursor:pointer;\n}\n\na.more-link, #more-link2:hover{\ncolor:#283841 !important; \ntext-decoration: none;\ncursor:pointer;\n}\n\n\n\n\n\n<\/style>\n\n\t\n<script>\nvar many_myfaq=0;\t\n<\/script>\n\t\n\t\n\n\t\n<script>\nvar change = true;\n\nfunction faq_changesrc2(x)\n{\nif (document.getElementById('stl2'+x))\n{\n\nif(change) {\nchange = false;\n\nif (document.getElementById('stl2'+x).src==\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\")\n{\ndocument.getElementById('stl2'+x).src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18a.png\";\ndocument.getElementById('stl2'+x).style.marginLeft=\"px\";\n\n}\nelse\n{\ndocument.getElementById('stl2'+x).src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\";\ndocument.getElementById('stl2'+x).style.marginLeft=\"px\";\n\n}\n\n}\n\nsetTimeout(\"change=true\",400);\n}\n}\n\n\n\nvar changeall = true;\nfunction faq_changeexp2()\n{\n\nfor (i=0; i<35; i++)\n{\n\nif (document.getElementById('stl2'+i))\n{\n\ndocument.getElementById('stl2'+i).src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18a.png\";\ndocument.getElementById('stl2'+i).style.marginLeft=\"px\";\n\n}\n}\n}\n\n\nfunction faq_changecoll2()\n{\nif(changeall) {\nchangeall = false;\nfor (i=0; i<35; i++)\n{\nif (document.getElementById('stl2'+i))\n{\ndocument.getElementById('stl2'+i).src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\";\ndocument.getElementById('stl2'+i).style.marginLeft=\"px\";\n}\n}\n}\nsetTimeout(\"changeall=true\",400);\n}\n\n<\/script>\t\n\t\t\n\n\t<style>\n\t\n\n\n\t\n\n\t\n\n\n\n@media screen and (max-width: 600px) {\n    #content2 {\n        width: 99%;\n    }\n\t\n\t#post_title2{\n\t\t width: 99%;\n\t\t\n\t}\n\t#post_content_wrapper2{\n\t\t width: 99%;\n\t\t\n\t}\n\t#post_right2{\n\t\t width: 99%;\n\t\t\n\t}\n}\n\n<\/style>\n\t \t\n\n\t\n\n<body>\n\t\t<div id=\"contentOuter\"><div id=\"contentInner\">\n  <div class=\"faq_content\" id=\"content2\" >\n  \n<ul class=\"posts\" style=\" \">\t\t\t\t                                                                             \n\t\t\t<!-- Loop Starts -->\n\t\t\t<li class=\"selected\" id=\"post-1236\" >\n\n\t\t\n<form class=\"searchform\" id=\"searchform2\" action=\"\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F154\" method=\"post\">\n<div style=\"display: block;\">\n<div style=\"position:relative;    text-align: right;\">\n\n<input id=\"skey2\" name=\"search2\"   value=\"Search...\" onfocus=\"(this.value == 'Search...') &amp;&amp; (this.value = '')\" onblur=\"(this.value == '') &amp;&amp; (this.value = 'Search...')\">\n<div class=\"sp_search_reset\">\n<input type=\"submit\" value=\"\" id=\"srbuts2\" name=\"submit2\" >\n\t\n<input type=\"submit\" value=\"\" id=\"srresbuts2\" name=\"reset2\"  >\n\n<\/div>\n<br><br>\n<\/div>\n<\/div>\t\n<\/form><img  style=\"display:none\"  src=\"https:\/\/www.isam.ca\/wp-content\/plugins\/spider-faq\/upload\/ikon\/like_black.png\"><img  style=\"display:none\"  src=\"https:\/\/www.isam.ca\/wp-content\/plugins\/spider-faq\/upload\/ikon\/like_white.png\"><img  style=\"display:none\"  src=\"https:\/\/www.isam.ca\/wp-content\/plugins\/spider-faq\/upload\/ikon\/unlike_black.png\"><img  style=\"display:none\"  src=\"https:\/\/www.isam.ca\/wp-content\/plugins\/spider-faq\/upload\/ikon\/unlike_white.png\"><div class=\"expcoll\" id=\"expcol2\">\n\t\t <a   class=\"post_exp\" id=\"post_expcol2\"><span onclick=\" iiiiiiiiiii=0; faq_changeexp2();expand_hits(1,2,22,'283841','283839')\">Expand All <\/span><\/a><span>|<\/span>\n\t\t <a   class=\"post_coll\" id=\"post_expcol2\"><span onclick=\"jjjjjjjjjjj=0; faq_changecoll2();expand_hits(0,2,22,'283841','283839')\">Collapse All<\/span><\/a><\/div><div class=\"cattitle\" id=\"cattitle2\"><span style=\"float:left\"><\/span>REFERENCES<\/div><div class=\"catdes\" id=\"catdes2\" >Reference files and History of DISAM.<\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span132\" onclick=\"faq_changesrc2(0)\"><div onclick=\"hits(13,2,22);edit_title(1,13,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >upgrading from old disam<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl20\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content13\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\nupgrading from old disam\r\n---------------------------------------------------------------------\r\n\r\nthe process of upgrading from older versions of disam should be as\r\nsimple as relinking with the new library, but there are a few things\r\nthat are different, and may need addressing.\r\n\r\n---------------------------------------------------------------------\r\nthe header file\r\n---------------------------------------------------------------------\r\n\r\nthe standard header file as distributed is named iswrap.h to avoid\r\nconfusion with older versions and to differentiate from the alternate\r\ninterface header, which is called isbase.h\r\n\r\nthe simplest procedure is to replace the contents of your original\r\ndisam.h with a copy of iswrap.h\r\n\r\nalternatively you might wish to create a new copy of disam.h which\r\ndoes nothing more than include either iswrap.h or a renamed copy of\r\nyour old disam (or cisam) header file. this would permit you to\r\neasily switch back and forth until you are comfortable with the new\r\nlibrary.\r\n\r\n---------------------------------------------------------------------\r\nthe trouble with isfdmap\r\n---------------------------------------------------------------------\r\n\r\nthe old disam library used an array of pointers, called isfdmap, to\r\nmanage it's table of open files. the new library uses an internally\r\nmanipulated dynamic array that is not quite as easy to get to, and\r\nthe associated file descriptor structure has changed significantly.\r\n\r\nanalogs for the more common values are now available via the\r\ncommon dictionary access routines described in wrap.ref\r\n\r\nplease let support know if anything important has been left out.\r\n\r\n---------------------------------------------------------------------\r\nvirtual file open handling (ISVIRTUAL define in old isport.h)\r\n---------------------------------------------------------------------\r\n\r\nolder versions of disam included a compile time option for\r\nvirtual file handling support. this was activated by means\r\nof the ISVIRTUAL define in isport.h\r\n\r\nit was designed to allow the library to bypass the system\r\nfile handle limit by swapping out (closing) inactive system\r\nhandles to make room for new opens.\r\n\r\nbecause it is not possible to retain locks on closed system\r\nhandles, this feature introduced a bug that created problems\r\nwith index access concurrency, sometimes resulting in index\r\ncorruption.\r\n\r\nat time of writing there appears to be no practical solution\r\nto this problem, and virtual file handling support has been\r\ndiscontinued in the current release.\r\n\r\nthe current library provides an alternative solution (although\r\nnot as extensive) via duplicate open handling. this feature,\r\nactive by default, allows the library to multiplex the system\r\nhandles used to access multiple opens on the same isam file.\r\n\r\nin other words - you can open the same isam file as often as\r\nyou wish without the need for additional system handles.\r\n\r\nwhile this does not cover instances where the application\r\nneeds to access large numbers of different isam files, it\r\nshould be of value under the circumstances denoted.\r\n\r\nno specific configuration is needed to access this feature,\r\nas it is an integral part of standard operation.\r\n\r\n---------------------------------------------------------------------\r\nisindex( int isfd, int idx, int locate );\r\n---------------------------------------------------------------------\r\n\r\nthe idx argument has been changed. under old disam, a value of zero\r\nwas used to select the primary index, and a value equal to the max\r\nnumber of active indexes was used to select natural order.\r\n\r\nthe new library uses a value of zero to denote natural order, and\r\nthe active index count starts at one.\r\n\r\nif you prefer the original functionality, please refer to the pre-\r\nprocessor directive within the islocate code in stdread.c\r\n\r\n---------------------------------------------------------------------\r\nispop( int isfd, int idx, long rec );\r\n---------------------------------------------------------------------\r\n\r\nthe idx argument has been changed. under old disam, a value of zero\r\nwas used to select the primary index, and a value equal to the max\r\nnumber of active indexes was used to select natural order.\r\n\r\nthe new library uses a value of zero to denote natural order, and\r\nthe active index count starts at one.\r\n\r\nif you prefer the original functionality, please refer to the pre-\r\nprocessor directive within the ispop code in stdread.c\r\n\r\nif you change ispop functionality you should make the same change\r\nin ispush.\r\n\r\n---------------------------------------------------------------------\r\nispush( int isfd, int *idx, long *rec );\r\n---------------------------------------------------------------------\r\n\r\nsince the new library no longer supports the isfdmap array, this call\r\nhas been added to load the current index and record numbers for later\r\nuse by ispop.\r\n\r\n---------------------------------------------------------------------\r\nisclone( int isfd, char *name );\r\n---------------------------------------------------------------------\r\n\r\nyou can no longer specify the mode of the new file, nor list the\r\nindexes to be copied. if this is a problem to you please let the\r\nsupport department know - the option was dropped because it was felt\r\nthat it had limited use and the associated varargs processing caused\r\nan amount of difficulty in porting.\r\n\r\nthe current version copies all indexes by default, and the open mode\r\nof the returned handle will be the same as for the original file.\r\n\r\n---------------------------------------------------------------------\r\niscopy( int isfd, char *name );\r\n---------------------------------------------------------------------\r\n\r\niscopy no longer requires that you pass a buffer to assist in the\r\ncopying process, and the extraneous flags argument has been dropped\r\nbecause it was never used.\r\n\r\n---------------------------------------------------------------------\r\nisgetmode( int isfd, int *mode );\r\n---------------------------------------------------------------------\r\n\r\nthis routine loads the open mode value into the mode pointer passed\r\n\r\n---------------------------------------------------------------------\r\nISAUTOLOCK behaviour\r\n---------------------------------------------------------------------\r\nDisam by default release automatic record locks only on a subsequent\r\nread. For older D-ISAM v3.x behaviour set isconfig.h D3XAUTOLOCK \r\nto 1 to enable automatic release on read, update or delete\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span142\" onclick=\"faq_changesrc2(1)\"><div onclick=\"hits(14,2,22);edit_title(1,14,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >upgrading from cisam<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl21\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content14\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>upgrading from cisam <\/strong>\r\n---------------------------------------------------------------------\r\n\r\nthe process of upgrading from cisam should be as simple as relinking\r\nwith the new library, but there are a few things that you should know\r\nabout.\r\n\r\n\r\n---------------------------------------------------------------------\r\nthe header file\r\n---------------------------------------------------------------------\r\n\r\nisam.h is cisam's standard header file, ours is called iswrap.h\r\n\r\nthere are three basic alternatives:\r\n\r\n1. modify your application code to include iswrap.h\r\n\r\n2. replace the contents of isam.h with a copy of iswrap.h\r\n\r\n3. create a new copy of isam.h which does nothing more than include\r\neither iswrap.h or a renamed copy of isam.h. this would permit\r\nyou to easily switch back and forth until you are comfortable with\r\nthe new library.\r\n\r\n\r\n---------------------------------------------------------------------\r\nwhat happens when you change the current key on rewrites\r\n---------------------------------------------------------------------\r\n\r\nthe best way to explain this is by example. assume you have a file\r\ncontaining the following records: AAA, BBB, CCC, EEE, and that the\r\ncurrent index is based on these values.\r\n\r\nunder cisam, if AAA was the current record and you were to change\r\nit's contents to DDD and rewrite, an isread or isstart with a mode\r\nof ISNEXT would set the current to EEE.\r\n\r\nthis can be somewhat problematic if you are doing a read next loop\r\nthrough your file, so we have arbitrarily adjusted this behaviour\r\nto ensure that the next record found will follow the current as set\r\nBEFORE the rewrite.\r\n\r\nthis means that, given the above example, BBB would become current\r\non an isread or isstart with a mode of ISNEXT.\r\n\r\nthe same (in reverse) is true when reading backwards through the\r\nfile with a mode if ISPREV.\r\n\r\nwe currently consider this behaviour to be an enhancement over the\r\ncisam standard, but would be happy to provide true cisam operation\r\nif anyone should ask for it. please contact the support department\r\nif this is important to you.\r\n\r\n---------------------------------------------------------------------\r\ncisam autolock \/ nowait \r\n---------------------------------------------------------------------\r\n\r\nfor cisam compatible nowait on open and automatic record locks set\r\nC7NOWAIT to 1 in isconfig.h\r\n\r\n---------------------------------------------------------------------\r\ncisam version 5.0 through 7.1 locking concurrency\r\n---------------------------------------------------------------------\r\n\r\nfor cisam version 5.0 through 7.1 locking concurrency when running\r\nagainst cisam executables set C7LOCKING to 1 in isconfig.h.\r\nkeep in mind that exectuables compiled with C7LOCKING set to 1\r\nwill no longer run concurrent with executables compiled for standard\r\ndisam locking.\r\n\r\n---------------------------------------------------------------------\r\ncisam version 7.2x locking concurrency\r\n---------------------------------------------------------------------\r\n\r\nsame as above, except C7LOCKING should be set to 2\r\n\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span152\" onclick=\"faq_changesrc2(2)\"><div onclick=\"hits(15,2,22);edit_title(1,15,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >base library reference<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl22\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content15\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<div><strong>base library reference<\/strong>\r\n---------------------------------------------------------------------\r\nthe library provides two separate interface methods. the base code\r\nuses allocated file descriptors ( similar to fopen\/fwrite etc ) to\r\nmanage isam files, and it will be this interface that is described\r\nhere. the differences between the base and the wrapper interfaces\r\nis covered in wrap.ref\r\n\r\n---------------------------------------------------------------------\r\nprimary details\r\n---------------------------------------------------------------------\r\n\r\nall modules which make base library calls should include isbase.h\r\n\r\nin all of the following, isfd will be used to refer to an open isam\r\nfile descriptor, as returned by isOpen or isBuild, and declared as:\r\n\r\nstruct IsamFile *isfd; \/* the formal way *\/\r\nIsFile *isfd; \/* typedef shortcut *\/\r\n\r\n---------------------------------------------------------------------\r\nreturn values and result indicators\r\n---------------------------------------------------------------------\r\n\r\nwith the exception of isBuild, isOpen and a few others, the base will\r\nreturn a boolean ISTRUE or ISFALSE. ISTRUE and ISFALSE are defined\r\nin the isbase.h header as 1 and 0 respectively.\r\n\r\nwhen ISFALSE is returned you will find the system or isam error code\r\nin isfd-&gt;iserrno, where isfd is an open file descriptor. isam error\r\ncodes start at 100 (refer to ISERRBASE in install.ref if you need to\r\nchange this) and are listed under error codes below. system error\r\ncodes have their usual values for the target system.\r\n\r\nif iserrno is less than 100 (ie a system error) isfd-&gt;iserrio will\r\nprovide a little more detail as to where and why, as listed under\r\nerrio codes below.\r\n\r\nin situations where no file descriptor is available, such as when\r\nisBuild or isOpen fail, or after isClose, isErase or isRename, the\r\ncall will return the error code in the global errno variable.\r\n\r\n---------------------------------------------------------------------\r\nIsFile *isBuild( char *name, int dlen, int mlen, IsKdsc *key, int mode );\r\n---------------------------------------------------------------------\r\nname: [path]name of file to be created\r\ndlen: length of data record in bytes\r\nmlen: if ISVARLEN then max record length else ignored\r\nkey: primary index description, see isam indexes\r\nmode: see open modes\r\nreturn: allocated file descriptor or NULL\r\n\r\nnote: if successful, isBuild will return an isam file descriptor\r\nopen in the specified mode and ready for use.\r\n\r\na NULL pointer is returned on failure and the error code will\r\nbe found in the global errno variable.\r\n\r\nrefer to varlen.ref for more details regarding ISVARLEN\r\n\r\n---------------------------------------------------------------------\r\nIsFile *isOpen( char *name, int mode );\r\n---------------------------------------------------------------------\r\n\r\nname: [path]name of an existing isam file\r\nmode: see open modes\r\nreturn: allocated file descriptor or NULL\r\n\r\nnote: the file name must be specified without the .dat or .idx\r\nextension, and must be less than 251 bytes in length.\r\n\r\nthe current index will be set to the primary.\r\n\r\na NULL pointer is returned on failure and the error code will\r\nbe found in the global errno variable.\r\n\r\n---------------------------------------------------------------------\r\nint isCleanUp( void )\r\n---------------------------------------------------------------------\r\n\r\nnote: this routine will close all currently open isam files and\r\nrelease all allocated global memory.\r\n\r\nonly available if the base library was compiled with the\r\nISADMIN feature activated.\r\n\r\n---------------------------------------------------------------------\r\nIsFile *isLockCheck( IsFile *isfd, int mode );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nflag: 0: off 1:on\r\n\r\nnote: a flag value of 1 will cause the library to fail on\r\nupdate or delete if the record in question has not\r\nbeen successfully locked prior to the operation. the\r\niserrno value returned in this instance is ENOCURR.\r\n\r\n---------------------------------------------------------------------\r\nIsFile *isSetMode( IsFile *isfd, int mode );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nmode: either ISMANULOCK or ISAUTOLOCK\r\n\r\nnote: this routine can be used to switch the designated file between manual and automatic locking modes.\r\n\r\nwhen switching from automatic to manual, the current record,\r\nif locked, will be released.\r\n\r\nfuture plans include the ability to switch to\/from exclusive\r\nlock as well, but at present an attempt to do so will result\r\nin an EBADARG error.\r\n\r\n---------------------------------------------------------------------\r\nIsFile *isClose( IsFile *isfd );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\n\r\nnote: isClose drops all locks and releases all allocated memory.\r\n\r\nisClose will return FALSE on failure and the error code will\r\nbe found in the global errno variable.\r\n\r\n---------------------------------------------------------------------\r\nint isAddIndex( IsFile *isfd, IsKdsc *key );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nkey: description of secondary index to add, see isam indexes\r\n\r\nnote: when adding an index to a populated file, isAddIndex will\r\nload the new index with keys for all the existing data\r\nrecords. in the case of larger files this could take a\r\nwhile..\r\n\r\nisAddIndex will attempt to place an exclusive lock on\r\nthe isam file for the duration of the update (assuming\r\nyou have not done so already) and will fail if any other\r\nprocess already has the file open.\r\n\r\n---------------------------------------------------------------------\r\nint isDelIndex( IsFile *isfd, IsKdsc *key );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nkey: description of secondary index to delete, see isam indexes\r\n\r\nnote: when deleting an index from a populated file, isDelIndex will\r\npurge the accumulated keys. in the case of larger files this\r\ncould take a while, but will be significantly faster than the\r\nisAddIndex call.\r\n\r\nisDelIndex will attempt to place an exclusive lock on\r\nthe isam file for the duration of the update (assuming\r\nyou have not done so already) and will fail if any other\r\nprocess already has the file open.\r\n\r\n---------------------------------------------------------------------\r\nIsFile *isCluster( IsFile *isfd, IsKdsc *key );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nkey: description of index to cluster on\r\n\r\nnote: the file must be open in exclusive mode\r\n\r\nthis routine makes use of a temporary file, created in the\r\nsame directory as the original.\r\n\r\nall active data records will be transferred to the temp file\r\nin the index order specified, and all indexes will be packed\r\nas efficiently as possible.\r\n\r\nif successful, isCluster will return a new file descriptor,\r\nopened in the same format as the original, which will be\r\nabandoned. a NULL pointer will be returned on error, and\r\nthe original descriptor and file will be left intact.\r\n\r\nbe warned that this call may take some time to run if the\r\nfile in question is large.\r\n\r\n---------------------------------------------------------------------\r\nint isErase( char *name );\r\n---------------------------------------------------------------------\r\n\r\nname: [path]name of an existing isam file to be physically removed.\r\n\r\nnote: isErase will not remove files that are currently in use by\r\nother processes.\r\n\r\nthe error code will be found in errno on failure.\r\n\r\n---------------------------------------------------------------------\r\nint isRename( char *old, char *new );\r\n---------------------------------------------------------------------\r\n\r\nold: original [path]name of an existing isam file\r\nnew: new [path]name of isam file\r\n\r\nnote: isRename will not rename files that are currently in use by other processes.\r\n\r\nisRename can be used to move an isam file from one directory\r\nto another, but not to a different drive or device.\r\n\r\nthe error code will be found in errno on failure.\r\n\r\n---------------------------------------------------------------------\r\nint isStart( IsFile *isfd, IsKdsc *kdsc, int len, char *data, int mode );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nkdsc: description of index to be selected or NULL to retain the current index\r\nlen: partial length of key, or 0 for full\r\ndata: data record pointer if needed for search mode, or NULL\r\nmode: see search modes\r\n\r\nnote: this routine has multiple purposes.\r\n\r\nif kdsc is passed then the index described will become current.\r\n\r\nif length is non zero then isStart will set a partial key\r\nlength for the selected index, and will only consider the\r\nfirst len bytes of the key during subsequent searches. this\r\nwill remain in effect until the next isStart call.\r\n\r\nthe selected location in the index will be flagged as a start\r\npoint, which means that the next call to isRead, if made with\r\na search mode of ISNEXT or ISPREV, will return the current\r\nrecord, rather than the actual next or previous. this is often\r\nuseful for initialising next or previous read loops.\r\n\r\nafter a successful isStart call, isfd-&gt;isrecnum will be set to\r\nthe current record number.\r\n\r\n---------------------------------------------------------------------\r\nint isRead( IsFile *isfd, char *data, int mode );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndata: pointer to data buffer to be loaded\r\nmode: search mode plus optional lock mode\r\n\r\nnote: if successful isfd-&gt;isrecnum will be set to the current record\r\nnumber.\r\n\r\nwhen isRead is called with ISLOCK, and the record requested\r\nis currently locked by another process, isRead will return\r\nISFALSE with an iserrno value of ELOCKED but will still have\r\nread the requested record into the data buffer.\r\n\r\n---------------------------------------------------------------------\r\nint isIndex( IsFile *isfd, int index );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nindex: index number to select\r\n\r\nnote: isIndex is used to select indexes by number. if index is\r\nzero then natural order will be selected, otherwise indexes\r\nare numbered starting at one for the primary index.\r\n\r\nisIndex retains a current record pointer for each index.\r\nafter selection the current pointer will be at the record\r\nselected when the index was last used.\r\n\r\n---------------------------------------------------------------------\r\nint isGoto( IsFile *isfd, long recnum );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nrecnum: an existing active record number\r\n\r\nnote: this call will locate the specified record in the current\r\nindex, making it the current index location.\r\n\r\nif successful, the specified record image will be found in\r\nisam-&gt;data.\r\n\r\n---------------------------------------------------------------------\r\nint isData( IsFile *isfd, char *data, long recnum );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndata: pointer to data buffer to be loaded\r\nrecnum: an existing active record number\r\n\r\nnote: isData performs a direct read on the data file, and does not\r\ndisturb the current index pointer, and does not check for\r\nrecord locks. it will return ENOREC if the record requested\r\ndoes not exist or has been deleted.\r\n\r\nisData is provided primarily as a means of accessing data\r\nrecords in as an efficient a manner as possible.\r\n\r\n---------------------------------------------------------------------\r\nint isWrite( IsFile *isfd, char *data );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndata: pointer to data record to be written\r\n\r\nnote: if successful this call will add the data record to the data\r\nfile and create an appropriate key in all indexes.\r\n\r\n---------------------------------------------------------------------\r\nint isWrLock( IsFile *isfd, char *data );\r\n---------------------------------------------------------------------\r\n\r\nnote: as for isWrite, but the resultant data record will be locked\r\non successful return.\r\n\r\n---------------------------------------------------------------------\r\nint isWrCurr( IsFile *isfd, char *data );\r\n---------------------------------------------------------------------\r\n\r\nnote: as for isWrite, but the current pointer in the current index\r\nwill be set to the record just written.\r\n\r\n---------------------------------------------------------------------\r\nint isDelete( IsFile *isfd, char *data );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndata: data record to be deleted\r\n\r\nnote: the record image passed is expected to contain enough data\r\nto cover the fields required by the primary index.\r\n\r\nif the primary index allows duplicates this call will fail,\r\nsince isDelete has no means of determining exactly which\r\nrecord you are referring to.\r\n\r\nthe original data image can be found in isfd-&gt;data on return.\r\n\r\n---------------------------------------------------------------------\r\nint isDelCurr( IsFile *isfd );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\n\r\nnote: this call will delete the currently selected record.\r\n\r\nthe original data image can be found in isfd-&gt;data on return.\r\n\r\n---------------------------------------------------------------------\r\nint isDelRec( IsFile *isfd, long recnum );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nrecnum: record number to be deleted\r\n\r\nnote: the original data image can be found in isfd-&gt;data on return.\r\n\r\n---------------------------------------------------------------------\r\nint isRewrite( IsFile *isfd, char *data );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndata: data image to be updated\r\n\r\nnote: the record to be updated is determined by the contents of\r\nthe primary index fields as found in the data image passed.\r\n\r\nif the primary index allows duplicates this call will fail.\r\n\r\nthe original data image can be found in isfd-&gt;data on return.\r\n\r\n---------------------------------------------------------------------\r\nint isRewCurr( IsFile *isfd, char *data );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndata: data record to be updated - the contents of the current record in the data file will be replaced with the image passed.\r\n\r\nnote: the original data image can be found in isfd-&gt;data on return\r\n\r\n---------------------------------------------------------------------\r\nint isRewRec( IsFile *isfd, long recnum, char *data );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nrecnum: record number to be replaced\r\ndata: data image with which recnum is to be replaced.\r\n\r\nnote: the original data image can be found in isfd-&gt;data on return\r\n\r\n---------------------------------------------------------------------\r\nint isRewNxt( IsFile *isfd, char *data );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndata: data record to be updated - the contents of the current record in the data file will be replaced with the image passed.\r\n\r\nnote: isRewNxt first sets the current pointer to the next record in\r\nthe current index before updating the original current record.\r\n\r\nit is useful in situations where the update would place the\r\nnew record between the original current and next keys in the\r\nindex.\r\n\r\non successful return the application can then read current to\r\nobtain the record that was next in the sequence before the\r\nupdate was performed.\r\n\r\nan error code of EENDFILE on an unsuccessful return indicates\r\nthat the update was successful and isRewNxt has reached the\r\nend of the file. any other error code indicates a failure\r\nin the update operation.\r\n\r\nthe original data image can be found in isfd-&gt;data on return\r\n\r\n---------------------------------------------------------------------\r\nint isLock( IsFile *isfd );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\n\r\nnote: this call will lock all records in the file against update\r\nby any process other than the current, or return ELOCKED if\r\nthis is not possible.\r\n\r\n---------------------------------------------------------------------\r\nint isUnLock( IsFile *isfd );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\n\r\nnote: reverses the action of isLock\r\n\r\n---------------------------------------------------------------------\r\nint isRelease( IsFile *isfd );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\n\r\nnote: this call will release any records that have been manually\r\nor automatically locked by the current process.\r\n\r\n---------------------------------------------------------------------\r\nint isRelRec( IsFile *isfd, long recnum );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nrecnum: record number to be unlocked\r\n\r\n---------------------------------------------------------------------\r\nint isRelCurr( IsFile *isfd );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\n\r\nnote: unlock the currently selected record\r\n\r\n---------------------------------------------------------------------\r\nint isSetUnique( IsFile *isfd, long value );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nvalue: new unique value starting point\r\n\r\nnote: this will set the value returned by the next call to isUniqueID.\r\n\r\n---------------------------------------------------------------------\r\nint isUniqueId( IsFile *isfd, long *value );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nvalue: pointer to variable to receive value\r\n\r\nnote: the value returned is guaranteed unique for the current file.\r\n\r\n---------------------------------------------------------------------\r\nint isIndexInfo( IsFile *isfd, IsKdsc *kdsc, int idx );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nkdsc: pointer to dictinfo or key description structure\r\nidx: zero for dictinfo, otherwise index number\r\n\r\nnote: this call serves two somewhat different purposes.\r\n\r\nif idx is zero, then it's actually expecting you to pass\r\na pointer to a dictinfo structure, which will then be\r\nloaded with information about the current file. refer to\r\nisIsamInfo below for a somewhat cleaner method.\r\n\r\nif idx is non zero then isIndexInfo will return the specified\r\nkey description, where a value of 1 represents the primary,\r\nfollowed by each successive index in the file.\r\n\r\n---------------------------------------------------------------------\r\nint isIsamInfo( IsFile *isfd, struct dictinfo *dict );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\ndict: pointer to dictinfo structure\r\n\r\nnote: this call will return information about the specified file\r\nin the structure passed. the values available are:\r\n\r\nshort di_nkeys; \/* number of indexes *\/\r\nshort di_recsize; \/* data record length *\/\r\nshort di_idxsize; \/* index record block size *\/\r\nlong di_nrecords; \/* current record count *\/\r\n\r\n---------------------------------------------------------------------\r\nint isCheckData( IsFile *isfd );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\n\r\nnote: this routine checks the data file and data file free list for\r\nerrors, and will return a value with the following bits set\r\nin accordance with it's findings:\r\n\r\nIC_DATREAD 0 \/* data file read error *\/\r\nIC_BADDATA 1 \/* data record corrupt *\/\r\nIC_DATFREE 2 \/* data free list is corrupt *\/\r\n\r\nif the return value is zero then no errors were detected.\r\n\r\n---------------------------------------------------------------------\r\nint isCheckIndex( IsFile *isfd, int idx );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nint: key id number, where 1 represents the primary\r\n\r\nnote: this routine checks the specified index for errors, and will\r\nreturn a value with the following bits set in accordance with\r\nit's findings:\r\n\r\nIC_IDXREAD 3 \/* index file read error *\/\r\nIC_ORDER 4 \/* key out of order *\/\r\nIC_COUNT 5 \/* index count mismatch *\/\r\nIC_BADMAGIC 6 \/* bad index node magic number *\/\r\n\r\nif the return value is zero then no errors were detected.\r\n\r\n---------------------------------------------------------------------\r\nint isCheckVarlen( IsFile *isam, struct isVarStat *stats );\r\n---------------------------------------------------------------------\r\n\r\nisfd: isam file descriptor\r\nstats: variable length statistics structure, defined in ischeck.h, or NULL to ignore same.\r\n\r\nnote: this routine checks the variable length storage system for\r\nerrors, and will return a value with the following bits set\r\nin accordance with it's findings:\r\n\r\nIC_VLMISFILE 12 \/* node misfiled in hash table *\/\r\nIC_VLHASHLINK 13 \/* mangled link in hash list *\/\r\nIC_VLMISSING 14 \/* nodes missing or unaccounted *\/\r\nIC_VLBADDATA 15 \/* data length mismatch *\/\r\n\r\nit will also optionally load the following fields in stats:\r\n\r\nhashcount; \/* number of nodes held in hashtable *\/\r\nhashspace; \/* total bytes free space in same *\/\r\nfullcount; \/* number of nodes not in hashtable *\/\r\nfullspace; \/* total (unusable) space in same *\/\r\nfilecount; \/* total number of storage nodes in use *\/\r\nfilespace; \/* total free space for the file *\/\r\n\r\n---------------------------------------------------------------------\r\nmachine independent data\r\n---------------------------------------------------------------------\r\n\r\nthe library includes the following series of calls to provide a means\r\nof generating data that will be transportable to different machines.\r\nuse of these is only required if you require such portability, since\r\nthe library will accept native formats without complaint.\r\n\r\nint ldInt( char *pad );\r\nint stInt( int value, char *pad );\r\nlong ldLong( char *pad );\r\nint stLong( long value, char *pad );\r\nint stChar( char *pad, char *str, int len );\r\nint ldChar( char *pad, int len, char *str );\r\ndouble ldFloat( char *pad );\r\nint stFloat( double value, char *pad );\r\ndouble ldDbl( char *pad );\r\nint stDbl( double value, char *pad );\r\nint stFltNull( double value, char *pad, short *null );\r\ndouble ldFltNull( char *pad, short *null );\r\nint stDblNull( double value, char *pad, short *null );\r\ndouble ldDblNull( char *pad, short *null );\r\n\r\nin all of the above, st identifies calls that will place a value in\r\nthe specified location, which can then be retrieved by the matching\r\nld call. the null suffix calls will load the variable passed (by\r\naddress) in the last parameter with a boolean ISTRUE if the associated\r\nvalue is zero, or ISFALSE if not.\r\n\r\nall pads referred to should be the size of the associated data type,\r\nwith the exception of ldInt\/stInt, which refer to a two byte integer,\r\nregardless of the native word size.\r\n\r\nnote that the float and double calls do not perform any actual data\r\nconversion, and are provided as a means of avoiding data alignment\r\nproblems. the int and long calls will perform byte order reversal\r\n(sometimes referred to as swabbing) on platforms where the least\r\nsignificant byte is found at the beginning of the field.\r\n\r\nnote also that ldint and stint operate on short (2 byte) integers,\r\nalthough the value and return are passed in the natural word size.\r\n\r\n---------------------------------------------------------------------\r\nisam indexes\r\n---------------------------------------------------------------------\r\n\r\nisam indexes are defined\/described by means of the keydesc structure.\r\n\r\nthe following is an example of the basic procedure, and describes an\r\nindex that allows duplicates, has full compression, and consists of\r\ntwo fields - a machine independent integer taken from the first two\r\nbytes of the record, and a character string from the seventh through\r\nsixteenth bytes.\r\n\r\nstruct keydesc key;\r\n\r\nkey.k_flags = ISDUPS+ISCOMPRESS; \/* see index flags *\/\r\nkey.k_nparts = 2; \/* number of fields involved *\/\r\nkey.k_part[0].kp_start = 0; \/* offset in data record *\/\r\nkey.k_part[0].kp_leng = INTSIZE; \/* length *\/\r\nkey.k_part[0].kp_type = INTTYPE; \/* type *\/\r\nkey.k_part[1].kp_start = 7; \/* offset in data record *\/\r\nkey.k_part[1].kp_leng = 10 * CHARSIZE; \/* length *\/\r\nkey.k_part[1].kp_type = CHARTYPE; \/* type *\/\r\n\r\nthis structure is then passed to isBuild, isAddIndex, or isStart.\r\n\r\nindex flag values - these apply to the index as a whole\r\n\r\nISNODUPS no duplicates permitted\r\nISDUPS duplicates permitted\r\nDCOMPRESS compress duplicates\r\nLCOMPRESS leading compression\r\nTCOMPRESS trailing space compression\r\nCOMPRESS full compression\r\nTNULL compress on nulls in TCOMPRESS\r\n\r\nindividual index component\/part\/field types\r\n\r\nCHARTYPE 0 array of bytes\/characters\r\nINTTYPE 1 two byte (short) integer\r\nLONGTYPE 2 four byte (long) integer\r\nDOUBLETYPE 3 ieee double floating point\r\nFLOATTYPE 4 ieee single floating point\r\nMINTTYPE 5 machine (native) short\r\nMLONGTYPE 6 machine (native) long\r\n\r\nISDESC 0x80 add to individual parts for descending order\r\n\r\nit is generally advisable to provide some callable means of loading\r\nyour key descriptions into a keydesc structure, or to provide some\r\nother means of easy access, since they will be needed for selecting\r\nindexes via isStart.\r\n\r\nyou will also need to exercise caution when using CHARTYPE fields\r\nas the library does not recognise null terminated strings. in other\r\nwords, if you're referring to a 10 byte wide character field, and it\r\ncontains a seven byte string, a null terminator and 2 garbage bytes\r\nfollowing the null, the library will build a key 10 bytes in length\r\nthat includes the null and trailing garbage. this key might prove\r\ndifficult to locate later..\r\n\r\nthe officially approved solution is to use the included stchar() and\r\nldchar() calls, which will pad the string passed with spaces on store\r\nand replace the null terminator on load.\r\n\r\nnote also that trailing compression operates on strings of trailing\r\nspaces, so the fairly common practice of padding the remainder of\r\nthe field with nulls could result in inefficient operation where\r\ntrailing compression is expected.\r\n\r\n---------------------------------------------------------------------\r\nopen modes\r\n---------------------------------------------------------------------\r\n\r\nthere are two different groups of open modes used by the isOpen and\r\nisBuild calls. the first group describes the operations which the\r\ncurrent process will be allowed to perform, while the latter controls\r\nwhat forms of external access will be permitted. you must chose one\r\nfrom each list.\r\n\r\nISINPUT open file for reading only\r\nISOUTPUT open file for writing only\r\nISINOUT open file for both reading and writing\r\nISSYNCWR all writes flushed to disk before return\r\n\r\nISMANULOCK record locks placed manually\r\nISAUTOLOCK record locks placed automatically on read\r\nISEXCLLOCK exclusive access to index and data\r\nISRDONLY read only - no locking\r\n\r\nISVARLEN variable length records - see varlen.ref\r\nISVARCMP RLE compressed varlen data\r\nISNOCARE open either fixed or variable length\r\n\r\nISMASKED index masking option - see mask.ref\r\n\r\nISTRANS transaction processing - see trans.ref\r\nISNOLOG disable logging - see trans.ref\r\n\r\nNOTE: ISSYNCWR is only active for systems that permit O_SYNC in the\r\nfile open call. this precludes most DOS flavoured systems.\r\n\r\n---------------------------------------------------------------------\r\nsearch modes\r\n---------------------------------------------------------------------\r\n\r\nall isRead operations act on the currently selected index.\r\n\r\nISFIRST select the first record in the index\r\nISLAST select the last record in the index\r\n\r\nISEQUAL search for and return the first exact match, or error\r\nISGTEQ search for first exact match, or next greater\r\nISGREAT search for the next greatest key in the index\r\n\r\nISNEXT skip to the next key in the index\r\nISPREV skip to the previous key in the index\r\nISCURR reread the current location.\r\n\r\nnote ISNEXT and ISPREV behave differently when used in isRead\r\nimmediately after in isStart call in that they will return\r\nthe current rather than the next\/previous record.\r\n\r\nthis is a feature, not a bug. the intention is to allow\r\nisStart to function as an initialisation call preceding\r\na read next\/previous loop, as in the following:\r\n\r\nisStart( isfd, &amp;secondary_index, 0, NULL, ISFIRST );\r\nwhile( isRead( isfd, data_pointer, ISNEXT ) )\r\ndisplay_data( data_pointer );\r\n\r\nthe above will read the contents of isfd from the top in\r\nsecondary_index order.\r\n\r\n---------------------------------------------------------------------\r\nlock modes\r\n---------------------------------------------------------------------\r\n\r\nthese are added to the search mode in isRead to lock or wait for the\r\nrelease of the selected record.\r\n\r\nISLOCK lock the selected record against external update\r\nISWAIT wait until the selected record has been released\r\nISLCKW wait for and unlock the selected record\r\n\r\nISLOCK will return an ELOCKED error if the selected record has been\r\nlocked, but will still return the selected record image. this allows\r\nthe process to read an externally locked record, but warns that updates\r\nwill not be permitted.\r\n\r\nISWAIT and ISLCKW do no deadlock processing, and will wait forever, so\r\napplications should be coded appropriately.\r\n\r\nthe isLock, isUnLock, isRelease, isRelRec and isRelCurr group of\r\nfunctions provide further control over record locking, and you can\r\nalso use ISEXCLLOCK to lock other processes out of a file completely.\r\n\r\n---------------------------------------------------------------------\r\nerror codes\r\n---------------------------------------------------------------------\r\n\r\nin addition to the standard operating system error codes, the library\r\nwill return the following values in isfd-&gt;iserrno where appropriate.\r\n\r\nEDUPL 100 illegal duplicate\r\nENOTOPEN 101 file not open\r\nEBADARG 102 illegal argument\r\nEBADKEY 103 illegal key description\r\nEBADFILE 105 isam file is corrupt\r\nENOTEXCL 106 can't get exclusive access\r\nELOCKED 107 record is locked\r\nEKEXISTS 108 index already defined\r\nEENDFILE 110 start or end file reached\r\nENOREC 111 record not found\r\nENOCURR 112 no current record\r\nEFLOCKED 113 file is locked\r\nEFNAME 114 file name is too long\r\nEBADMEM 116 can't allocate memory\r\nENOPRIM 127 no primary key\r\n\r\nwhen the library returns a system error code it will also load\r\nisfd-&gt;iserrio with the sum of the following two groups of values:\r\n\r\nIO_IDX 0x01 index file\r\nIO_DAT 0x02 data file\r\n\r\nIO_OPEN 0x10 while opening\r\nIO_CREA 0x20 while creating\r\nIO_SEEK 0x30 while seeking\r\nIO_READ 0x40 while reading\r\nIO_WRIT 0x50 while writing\r\nIO_LOCK 0x60 while locking\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/div>\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span162\" onclick=\"faq_changesrc2(3)\"><div onclick=\"hits(16,2,22);edit_title(1,16,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >answers to frequently asked questions<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl23\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content16\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>answers to frequently asked questions<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nQ: i'm sure i have compiled the library properly, and i am sure i\r\nhave the right linker commands, but i keep getting unresolved\r\nreferences to base library (isUppperCase) functions..\r\n\r\nA: if you're linking wrapper (islowercase) calls then it is possible\r\nyour linker resolves references canonically - in a single pass\r\nthrough the listed libraries. linker objects should be listed\r\nin order of precedence - object module(s), wrapper lib, base lib.\r\n\r\n\r\nQ: everything appears to compile normally, but i sometimes get\r\n\"FATAL iscomp.c(55)\" when trying to read or update my files\r\n\r\nA: your compiler is probably defaulting char types to unsigned -\r\nyou will need to set your compiler to produce signed char types\r\nby default, and rebuild the library.\r\n\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span172\" onclick=\"faq_changesrc2(4)\"><div onclick=\"hits(17,2,22);edit_title(1,17,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >suggestions, pitfalls and defenses<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl24\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content17\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>suggestions, pitfalls and defenses<\/strong>\r\n---------------------------------------------------------------------\r\nlong duplicate chains\r\n---------------------------------------------------------------------\r\n\r\nif you are using keys that will result in a large number of duplicate\r\nrecords, you should be warned that deletes and rewrites within these\r\ncan become painfully slow. this is due to the fact that, when you\r\nrequest an update or delete, the library is forced to start at the\r\nbeginning of the chain and read sequentially through each looking\r\nfor the record number you are referring to.\r\n\r\nthe isam standard does not currently appear to offer a solution to\r\nthis problem, but if anyone has any suggestions you can be sure we'll\r\nbe interested.\r\n\r\nif this is a concern, specifically during long update runs that will\r\nbe doing a large amount of duplicate key changes, you might wish to\r\nconsider deleting the offending indexes before you start, and adding\r\nthem again after the run is complete. this is potentially dangerous,\r\nof course, but the advantages will be significantly faster processing\r\ntimes and better balanced trees on completion.\r\n\r\nlong duplicate chains are not a problem when writing or reading, since\r\nwrites get tacked onto the end of the chain, and reads are sequential\r\nby definition.\r\n\r\n\r\nduplicate open files\r\n---------------------------------------------------------------------\r\n\r\nisam allows you to open the same file many times within a given\r\nprocess. cisam and older disam also allowed some rather dangerous\r\noperations on these files. for instance:\r\n\r\nfd = build file\r\nerase file\r\nwrite records to fd\r\nclose file\r\n\r\nnone of the above will return any errors, but you won't be able\r\nto open the file again because it has been erased from the file\r\nsystem - everything written has been discarded.\r\n\r\nthe ISDUPLOCKS option in isconfig.h, when set to a value of one,\r\nwill prevent the library from erasing or renaming files which are\r\nalready open in the current process.\r\n\r\nwhen ISDUPLOCKS is zero this will not be enforced, and it is up to\r\nthe application to apply the appropriate degree of caution.\r\n\r\n\r\n--------------------------------------------------------------------- \r\nCOMPRESS\/LCOMPRESS\/TCOMPRESS \r\n\r\nISKCOMP 0\r\ndue to fixed index file format specifications, a single char is used\r\nto store the number of leading compressed bytes and another to store\r\nthe number of trailing compressed bytes. this forces a limitation\r\nof 255 bytes ( max unsigned char ) for compressed key size,\r\nregardless of ISMAXKEY setting to ensure full compression of all\r\ntrailing spaces or nulls for TCOMPRESS, and all leading duplicate\r\ncharacters for LCOMPRESS.\r\n\r\nISKCOMP 1\r\nallows compressed key sizes larger than 255 bytes, but will only\r\npermit partial compression on leading and trailing characters.\r\na maximum of 255 leading duplicate characters, and 255 trailing \r\nspaces or nulls will be compressed.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span182\" onclick=\"faq_changesrc2(5)\"><div onclick=\"hits(18,2,22);edit_title(1,18,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >audit trail mechanism<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl25\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content18\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>audit trail mechanism<\/strong>\r\n---------------------------------------------------------------------\r\nISAUDIT settings in isconfig.h\r\n\r\n0 - no audit functionality\r\n1 - audit writes, updates and deletes\r\n2 - audit writes only\r\n3 - audit deletes only\r\n4 - audit updates only\r\n5 - audit writes and deletes\r\n6 - audit writes and updates\r\n7 - audit deletes and updates\r\n\r\n---------------------------------------------------------------------\r\nint isAudit( IsFile *isfd, char *pad, int mode );\r\n---------------------------------------------------------------------\r\n\r\nisfd isam file descriptor\r\npad pointer to pad, usage dependent on mode\r\nmode operation mode, see below\r\n\r\nnote mode is one of the following:\r\n\r\nAUDSTART start recording\r\nAUDSTOP stop recording\r\nAUDSETNAME name and path of audit file\r\nAUDGETNAME return current name and path\r\nAUDINFO recording status\r\n\r\nstart and stop do not refer to pad, setname and getname will\r\nstore and retrieve (respectively) a null terminated string\r\nfrom or to pad. audinfo will set the first byte of pad to\r\na value of zero (stopped) or one (active).\r\n\r\nthere are a couple of obvious caveats:\r\n\r\ndo not start recording until you have set a file name.\r\nbe careful not to use the same audit file for more than\r\none file.\r\nthe filename cannot be longer than 64 characters.\r\n\r\nisAudit generally returns an EBADARG error if you do some-\r\nthing wrong.\r\n\r\n---------------------------------------------------------------------\r\ninstallation\r\n---------------------------------------------------------------------\r\n\r\naudit trail support is activated by setting ISAUDIT to a value of 1\r\nin isconfig.h before compiling the library.\r\n\r\n\r\n---------------------------------------------------------------------\r\nnotes and caveats\r\n---------------------------------------------------------------------\r\n\r\nthe audit trail is essentially a more streamlined alternative to the\r\nfull featured transaction processing option. only updates to the file\r\nare tracked, and the processing overhead is less. while there is no\r\nharm in having both options active in your library at the same time,\r\nit would be somewhat redundant to have both in use on the same file.\r\n\r\ntwo things to be aware of:\r\n\r\nthe audit trail impacts the overall efficiency of the library - if\r\nyou do not plan to use it, you would probably be best advised to leave\r\nit inactive.\r\n\r\nonce a file has been designated as having an audit trail, and even if\r\nthe trail is currently in the inactive state (AUDSTOP'ed), updates to\r\nthe file will be slower because the design (not our fault, talk to the\r\ncisam people) requires that the status be checked each time the file\r\nis updated by another process. this is only the case when the file is\r\nopen by multiple processes.\r\n\r\nthis information presented mostly for reference - the actual impact\r\nis reportedly quite minimal under all platforms tested.\r\n\r\n\r\n---------------------------------------------------------------------\r\n\r\nthe format of the audit trail consists of a header record followed by\r\na data image, repeated sequentially. in the case of variable length\r\nfiles, an additional 2 bytes are included to give the record length.\r\nall values are stored in machine independent (ldint\/ldlong) format.\r\n\r\nstruct audhead \/* audit record header format *\/\r\n{\r\nchar au_type[2]; \/* record type (aa\/dd\/rr\/ww) *\/\r\nchar au_time[4]; \/* date and time *\/\r\nchar au_procid[2]; \/* process id *\/\r\nchar au_userid[2]; \/* user id *\/\r\nchar au_recnum[4]; \/* record number *\/\r\nchar au_reclen[2]; \/* record length if variable *\/\r\n};\r\n\r\n#define AUDHEADSIZE 14 \/* audit header length *\/\r\n#define VAUDHEADSIZE 16 \/* if variable length *\/\r\n\r\ntype codes are translated as follows:\r\n\r\naa - record added to file\r\ndd - record deleted from file\r\nrr - record image before rewriting\r\nww - record image after rewriting\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span192\" onclick=\"faq_changesrc2(6)\"><div onclick=\"hits(19,2,22);edit_title(1,19,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >large files - 64bit implementation<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl26\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content19\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>large files - 64bit implementation<\/strong>\r\n---------------------------------------------------------------------------\r\n\r\nas of version 6.12 we have attempted to implement 64bit support for\r\nlarge files. todate most unix platforms as well as NT are supported. \r\nas more systems develop 64bit capability we will add the same support for\r\ndisam. we have attempted to make switching to 64bit support as\r\nsimple as setting a compile time flag..ISHUGE found in isconfig.h. you\r\nmay need to redefine the ISHUGE related settings for OFFT and UOFFT,\r\ndepending on how your OS handles large file support and lseek offsets.\r\nsecond level support can be found in isbase.h where platform specific\r\nfunctions such as lseek64 are defined. \r\n\r\nplease let us know if you require 64bit functionality for your platform,\r\nor if you successfully manage to get 64bit working on any platform not\r\ncurrently setup.\r\n\r\n---------------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span202\" onclick=\"faq_changesrc2(7)\"><div onclick=\"hits(20,2,22);edit_title(1,20,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >custom key types<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl27\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content20\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>custom key types<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nthe following steps are required to add your own custom keys:\r\n\r\nset ISCUSTOM to 1 in isconfig.h\r\n\r\nset ISCUSTKEYS to 1 in base\/iscustom.h, and add defines for the key\r\ntype(s) and size(s) you require.\r\n\r\nadd a case for each key type to the switch statement in isCustCmp()\r\nin base\/iscustom.c. each case should set retc to a negative value\r\nif key one is less than key two, positive if greater, and zero if\r\nequal.\r\n\r\nremove the sample key types unless you need them.\r\n\r\ninclude iscustom in your makefile.\r\n\r\nNOTE: be careful, if\/when applying updates, that you do not overwrite\r\nany changes you have made to the base files.\r\n\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n--------------------------------------------------------------------- \r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span212\" onclick=\"faq_changesrc2(8)\"><div onclick=\"hits(21,2,22);edit_title(1,21,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >design concepts<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl28\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content21\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>design concepts<\/strong>\r\n----------------------------------------------------------------------\r\n\r\nin order to facilitate thread safe programming, the core library has\r\nbeen developed to use isam file descriptor structures, rather than\r\nthe standard integral handle concept. the external function calls\r\nare named after the original function names, but use capital letters\r\nto keep them separate, as in isOpen rather than isopen. the status\r\nand information globals, such is iserrno and iserrio, have been\r\neliminated, and each file descriptor now carries it's own copy. \r\n\r\nthe standard (lower case) calls are provided as an optional wrapper\r\nlayer which maintains a dictionary of descriptors to allow mapping\r\nvia the standard integer file handles. it also defines and passes\r\nthe standard global variables.\r\n\r\n----------------------------------------------------------------------\r\nconventions\r\n----------------------------------------------------------------------\r\n\r\nall public library function names start with 'is' and use capital\r\nletters to distinguish keywords.\r\n\r\nall structure definitions and typedefs start with a capital letter,\r\nand use the same capitalisation rules to distinguish keywords.\r\n\r\nthe posix standard system calls are wrapped in functions prefixed\r\nby is and an underscore.\r\n\r\nlocal support routines in each module are named in lowercase.\r\n\r\nmacro definitions are all capitals.\r\n\r\nvirtually all entry and internal functions return TRUE on success\r\nand FALSE on failure. TRUE is defined as 1, FALSE is 0.\r\n\r\n\r\n----------------------------------------------------------------------\r\nbuffering\r\n----------------------------------------------------------------------\r\n\r\nthe tree node buffering system operates by handing node images which\r\nare no longer part of the current path to a storage mechanism. each\r\nindex carries it's own path list and storage array.\r\n\r\na single linked list holds the current path and facilitates traversal\r\nwithout having to move data around. the node description structures,\r\nwhich contain current status information and a copy of the node disk\r\nimage, are are passed to and from the path list and the buffer array\r\nas pointers.\r\n\r\nthe buffer cache is currently optimised on a last in first out basis.\r\nit might be worthwhile to consider optimising this further by giving\r\na degree of precedence to nodes from lower levels in the tree, on the\r\nassumption that these will take more hits.\r\n\r\nbuffers are flagged invalid whenever the index file header transaction\r\ncount has been changed by another process, and will be refreshed as\r\nrequired.\r\n\r\nat some point in the future, at the cost of cisam concurrency, it may\r\nbe worthwhile to consider designing a more detailed currency control\r\nwhich would maintain separate transaction counts for each index, and\r\nperhaps additional counts for the index and data free lists, variable\r\nlength storage space, and so on.\r\n\r\nthe same buffering system provides a failsafe error recovery method\r\nin which updated node images are flagged invalid on error, which then\r\nresults in a forced refresh before the image can be used again. this\r\nmethod allows for optimistic updates, eliminating the need to check\r\nfirst before embarking on potentially illegal updates. see error\r\nhandling below for more details.\r\n\r\n\r\n----------------------------------------------------------------------\r\nuncompressed (flat) versus compressed indexes\r\n----------------------------------------------------------------------\r\n\r\nfor the dual purpose of keeping the code cleaner and to improve\r\nperformance, the index handling routines are split into separate\r\nfunctions where the associated handling is markedly different.\r\n\r\nflat indexes, in general, can be operated on mathematically, lend\r\nthemselves to shell searches, and permit the current key value to\r\nbe a simple pointer into the node image.\r\n\r\ncompressed indexes require that each node be searched in a linear\r\nfashion, building the key image in an allocated buffer en route,\r\nand generally require a fair amount more processing to operate.\r\n\r\nthe index handing and manipulation modules - isnode, isgrow and\r\nisprune - all adhere to this standard. the decision as to which\r\nhandling method to apply is made at the top level, eliminating the\r\nneed for myriad if-then-else tests during processing.\r\n\r\n\r\n----------------------------------------------------------------------\r\nerror handling\r\n----------------------------------------------------------------------\r\n\r\nthe new library deals with errors via setjmp\/longjmp. each external\r\nentry point is responsible for initialising a jump buffer and mode\r\nflag in the file descriptor. when an error is detected the thread\r\nis passed to an error handling routine which sets the error codes\r\nand drops the index locks before returning control the entry call.\r\n\r\nthe error handling routine is also responsible for clearing the\r\nupdate buffers when triggered in write mode.\r\n\r\nthe nature of setjmp\/longjmp means that it appears to the calling\r\nfunction as if the ISFAIL call, made initially to initialise the\r\njump buffer, had returned TRUE.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span222\" onclick=\"faq_changesrc2(9)\"><div onclick=\"hits(22,2,22);edit_title(1,22,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >disam client\/server reference<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl29\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content22\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>disam client\/server reference<\/strong>\r\n----------------------------------------------------------------------------\r\nto access isam filesets on remote machines set ISCLIENT in isconfig.h to 1\r\nprior to compiling the Disam library. link your application code on the\r\nclient to the Disam library as well as to the platforms socket library\/\r\nlibraries (SCO-libsocket.a, SUN-libsocket.a and libnsl.a, NT-wsock32.lib).\r\nbefore executing the application you must start the server program,\r\nrisamsrv on your server machine. this program may be run in foreground or \r\nback ground mode. risamsrv - listens for requests from the client and \r\nexcutes the isam calls passed from the client program on the isam files\r\non the server machine.\r\n\r\n** important: the risamsrv executable expects ISMAXPARTS in isconfig.h\r\nto be set to the default setting of 20. If you've compiled your client\r\nDisam library with a setting other than 20..please contact Byte Designs\r\nso we may customize risamsrv to suit your client library configuration.\r\n--------------------------------------------------------------------------\r\n\r\nthere are two ways to let disam know where the remote files exist:\r\n\r\ni) specify the ip of the remote machine as well as the full path\r\nof the filename when opening the isam fileset.\r\n\r\ne.g. strcpy( filename, \"\/\/209.99.99.9\/isampath\/testfile\" );\r\nfd = isopen( filename, ISINOUT + ISMANULOCK );\r\n\r\n-or-\r\n\r\nii) set the environment variable on the client machine to the ip address\r\nof the server machine where the isam files reside:\r\n\r\nRISAMHOST = 209.99.99.9\r\n\r\nDisam determines if a fileset is local or remote by checking for the prefix\r\nof \"\/\/\" on unix or \"\\\" on dos, win, nt in the filename. if mutiple slashes\r\nprefix a filename without an ip address..Disam expects RISAMHOST to be set.\r\nif no multiple slashes prefix a filename\/path Disam defaults to local path\/\r\nfilename.\r\n\r\nas well as the standard group of isam calls, Disam also support remote\r\nsystem calls such as open\/sopen, read, write, lseek etc..these are called\r\nbe prefixing the call with r for example rread()\/rwrite().\r\n\r\nDisam client\/server code defaults the remote port number to 5002. If this\r\nport number is already in use you may bypass the default by setting the \r\nenvironment variable RISAMPORT to the port number you wish to use.\r\n\r\n--------------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n--------------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span232\" onclick=\"faq_changesrc2(10)\"><div onclick=\"hits(23,2,22);edit_title(1,23,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >dcheck<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl210\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content23\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>dcheck<\/strong>\r\n---------------------------------------------------------------------\r\n\r\ndcheck - isam file integrity check\/repair utility\r\n\r\nusage - dcheck [-hifbB] [...]\r\n\r\noptions - h - display isam header information only\r\ni - just check indexes, ignore data file\r\nf - fix corrupt indexes\r\nb - rebuild all indexes\r\nB - rebuild specific index\r\n\r\nthe option string, preceded by a dash, can be placed anywhere on the\r\ncommand line. all options must be specified in one string, and all\r\noptions apply to all files specified.\r\n\r\nthe -B option is a little different. it can be specified multiple\r\ntimes, and each occurance must be followed by an index number. a\r\nvalue of 1 denotes the primary index, 2 the next, etc. you cannot\r\nspecify -B on multiple files.\r\n\r\ndcheck is not interactive, and will ask no questions, so it can be\r\nsafely used in batch and script files without operator intervention.\r\n\r\ndcheck has been designed to run co-operatively ( unless -f or -b\r\nspecified ) on files in active use, but note that other processes\r\nwill be blocked for the duration of some of the check cycles.\r\n\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2013)\r\n--------------------------------------------------------------------- \r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span242\" onclick=\"faq_changesrc2(11)\"><div onclick=\"hits(24,2,22);edit_title(1,24,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >dpack<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl211\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content24\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>dpack<\/strong>\r\n---------------------------------------------------------------------\r\n\r\ndpack - isam file pack\/rebuild utility\r\n\r\nusage - dpack [...]\r\n\r\ndpack takes a list of one or more isam files and will rebuild each\r\nin turn. it works by building a temporary copy of the original file\r\nand copying all active data records to it, then deleting the original\r\nand renaming the working copy.\r\n\r\nthe temporary file is created in the same directory as the original\r\nand is named dpnnnnn, where nnnnn is the current process id.\r\n\r\nyou must ensure that you have write permission on the data directory\r\nand that there is enough room for dpack to build the working copy.\r\n\r\ndpack will fail if it cannot obtain an exclusive lock on the file.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span252\" onclick=\"faq_changesrc2(12)\"><div onclick=\"hits(25,2,22);edit_title(1,25,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >dreport (new)<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl212\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content25\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>dreport<\/strong>\r\n---------------------------------------------------------------------\r\n\r\ndreport - create .xml, .csv or .txt output from isam data\r\n\r\nusage - dreport \r\n\r\ndreport takes an .xml format input file that provides the report details,\r\nsee export\/samples directory for sample input files, and produces output based\r\non the input file specifications. dreport allows for isam file cross reference,\r\nand filtering of data.\r\n\r\nsample tests provided in the export directory.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n--------------------------------------------------------------------- \r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span262\" onclick=\"faq_changesrc2(13)\"><div onclick=\"hits(26,2,22);edit_title(1,26,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >dschema (new)<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl213\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content26\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\ndschema\r\n---------------------------------------------------------------------\r\n\r\ndschema - utility to load, store or dump schema file to\/from isam file\r\n\r\nusage - dschema [-dDSr] \r\nwhere d - dump schema layout from isamfile to stdout\r\nD - dump schema layout to path\r\nS - store schemafile to isamfile\r\nr - remove schema layout from isamfile\r\n\r\ndschema can be used to store a schema layout for an isam file to the isam file\r\nwhere it can be used to report on data from the isamfile via dreport or simply\r\nas a reference to the layout of the isamfile.\r\n\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n--------------------------------------------------------------------- \r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span272\" onclick=\"faq_changesrc2(14)\"><div onclick=\"hits(27,2,22);edit_title(1,27,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >dsplit<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl214\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content27\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\ndsplit\r\n---------------------------------------------------------------------\r\n\r\ndpack - isam file split utility\r\n\r\nusage - dsplit [...]\r\n\r\ndpack takes an isam file and will split the original file into two\r\nsmaller isamfiles, each with the same name as the original for the\r\nprefix but with a 1 and 2 appended to the original name.\r\nit works by building two temporary copies of the original file\r\nand copying half the active data records into filename1 and the\r\nsecond half into filename2. dsplit can be compiled to delete the \r\noriginal fileset by adding a #define REMOVE to the code before compiling.\r\n\r\nthe temporary files are created in the same directory as the original.\r\n\r\nyou must ensure that you have write permission on the data directory\r\nand that there is enough room for dpack to build the working copies.\r\n\r\ndpack will fail if it cannot obtain an exclusive lock on the file.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span282\" onclick=\"faq_changesrc2(15)\"><div onclick=\"hits(28,2,22);edit_title(1,28,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >dvlrebld (new)<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl215\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content28\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>dvlrebld<\/strong>\r\n---------------------------------------------------------------------\r\n\r\ndvlrebld - variable length isam file conversion utility\r\nspecifically for converting variable length isam files from\r\nold disam\/c-isam standard to new disam v7.0 format - expects\r\nISOLDVARLEN to be set to 0 in isconfig.h prior to compiling library\r\nand this utility.\r\n\r\nusage - dvlrebld \r\n\r\ndvlrebld converts old disam\/c-isam format variable length files to the new\r\nvariable length format now used by disam. this new format overcomes the old\r\nrecord number limit of 16777216L previously imposed on varinfo and continuation\r\nnode pointers when being stored in 3 character bytes.\r\n\r\nthe temporary file is created in the same directory as the original\r\nand is named dpnnnnn, where nnnnn is the current process id.\r\n\r\nyou must ensure that you have write permission on the data directory\r\nand that there is enough room for dvlrebld to build the working copy.\r\n\r\ndvlrebld will fail if it cannot obtain an exclusive lock on the file.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span292\" onclick=\"faq_changesrc2(16)\"><div onclick=\"hits(29,2,22);edit_title(1,29,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >dstats<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl216\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content29\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>dstats<\/strong>\r\n---------------------------------------------------------------------\r\n\r\n\r\ndstats - report library statistics - expiration date, compilation date\r\nand client limit\r\nusage - dstats\r\n\r\ndlist makes use of the isLibInfo() or islibinfo() functions to load\r\nand report some library statistics. dstats is only useful if it is\r\nrecompiled and relinked when ever the library is recompiled, to ensure\r\nthat the statistics reported are current.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span302\" onclick=\"faq_changesrc2(17)\"><div onclick=\"hits(30,2,22);edit_title(1,30,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >expiration date<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl217\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content30\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>expiration date<\/strong>\r\n---------------------------------------------------------------------\r\n\r\na simple mechanism for setting an automatic\r\nexpiration date in the library is provided by means of a define.\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span312\" onclick=\"faq_changesrc2(18)\"><div onclick=\"hits(31,2,22);edit_title(1,31,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >isconfig.h ISEXTENDED configuration setting<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl218\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content31\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>isconfig.h ISEXTENDED configuration setting<\/strong>\r\n---------------------------------------------------------------------\r\n\r\ndefining ISEXTENDED to 1 will ensure the global ispid will\r\nhold the id of the process blocking the lock attempt by the calling\r\nprocess - ISLOCKING 2 only.\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span322\" onclick=\"faq_changesrc2(19)\"><div onclick=\"hits(32,2,22);edit_title(1,32,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >isread filtering<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl219\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content32\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>isread filtering<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nthis feature is currently only available in the wrapper - please let\r\nthe support department know if this is a problem to you.\r\n\r\nthe isfilter() call provides a means of externally controlling which\r\nrecords are accessible via isread(). originally developed inhouse as\r\na means of avoiding the work involved in updating inflexible older\r\napplication code, it allows the programmer to register a routine that\r\nwill be called, on a per file basis, to check if each record located\r\nby isread() is valid.\r\n\r\n---------------------------------------------------------------------\r\nisfilter( int isfd, int ( *filter )() );\r\n---------------------------------------------------------------------\r\n\r\nisfd isam file handle\r\nfilter application defined filter routine\r\n\r\nnote once a filter routine has been registered, it will be called\r\nautomatically each time isread() locates a record().\r\n\r\npass a NULL pointer for filter to deactivate.\r\n\r\n--------------------------------------------------------------------- \r\n\r\nthe application filter routine should be declared as:\r\n\r\nint myfilter( int isfd, char *data, int mode );\r\n\r\nisfd the associated isam file handle\r\ndata data record pointer as passed to isread()\r\nmode the mode parameter passed to isread()\r\n\r\nif the filter routine returns a value of one, then isread() will\r\nreturn the record found.\r\n\r\nif the filter routine sets iserrno and returns a value of zero,\r\nthen isread() will return the specified error to the application.\r\n\r\nif iserrno is not set, and the read mode is one of those listed\r\nbelow, isread() will attempt to read the next record as shown\r\nand, if successful, will call the filter routine again.\r\n\r\nISFIRST read next\r\nISLAST read previous\r\nISNEXT read next\r\nISPREV read previous\r\nISGREAT read greater\r\nISGTEQ read greater \r\n\r\nisread() will return ENOREC if the original mode was either ISCURR\r\nor ISEQUAL.\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span332\" onclick=\"faq_changesrc2(20)\"><div onclick=\"hits(33,2,22);edit_title(1,33,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >user info<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl220\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content33\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>user info<\/strong>\r\n---------------------------------------------------------------------\r\n\r\ntwo functions\r\n\r\nint isUserInfo( struct IsamFile *isam, int mode, char *pad );\r\nint isuserinfo( int isfd, int mode, char *pad );\r\n\r\nwhere pad is a character array of size USERINFOSIZE.\r\n\r\nUSERINFOSIZE is fixed at ten bytes and should not be changed.\r\n\r\nallow the application to store a fixed length ten byte info pad\r\nin the index header of any isam file.\r\n\r\nmode has two possible values\r\n\r\nISINPUT load pad from index header\r\nISOUTPUT write pad to index header\r\n\r\nthese ten bytes are freely available to any application system\r\nthat requires the ability to store additional information about\r\na given isam file.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span342\" onclick=\"faq_changesrc2(21)\"><div onclick=\"hits(34,2,22);edit_title(1,34,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >installation<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl221\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content34\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>installation<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nthe library is split into two sections - the base and the wrapper -\r\nas explained in source.ref. the base source is found in the base\r\nsubdirectory, and the wrapper source in wrap. all public header\r\nfiles are in the head directory.\r\n\r\nif you plan to use only the base library then you can ignore both\r\nthe wrap directory and head\/iswrap.h\r\n\r\nif you are planning to use only the wrapped (cisam standard) calls\r\nthen you should probably compile everything into one library and\r\nignore head\/isbase.h\r\n\r\nif you intend to use both flavours, then it might be an idea to\r\nbuild two separate libraries, but this is optional.\r\n\r\nnote that if you plan to use the wrapper calls, or the transaction\r\nprocessing module, the base library MUST be compiled with ISADMIN\r\nactivated.\r\n\r\nbefore starting you will need to edit isconfig.h and adjust it as\r\nappropriate - refer to configuration below for details.\r\n\r\nNOTE: some compilers produce unsigned char types as the default.\r\nthis must be changed - at least when compiling the base and\r\nwrapper modules - all char types must default to signed.\r\nthis inconvenience will be corrected in future releases.\r\n\r\nyour compiler may generate a number of warnings to the effect that\r\ncertain lines of code have no effect, or that arguments are not used\r\nin some functions. this is an expected situation and is due to the\r\nfact that turning some options off will result in functions being\r\nnulled by means of empty ifdef declarations in some cases, or replaced\r\nby empty stubs in others.\r\n\r\nthe source for the dcheck utility is located in the util directory\r\nand should be linked with the base library to produce an executable.\r\ndocumentation for same will be found in dcheck.ref. the same is\r\ntrue for the dpack and dlist utilities.\r\n\r\nthe test directory contains a collection of benchmark utilities,\r\ndocumented in test.ref\r\n\r\nyou will find a generic makefile in the make directory. to use the\r\nmakefile, copy the contents of head, wrap and base into one directory,\r\nedit isconfig.h as explained below, edit the makefile and follow the\r\ncomments.\r\n\r\nthe makefile should be compatible with most standard unix platforms,\r\nand should also be compatible with a fair number of the more standard\r\ndos, windows and os2 compilers, as well as the gnu make command.\r\n\r\n\r\n---------------------------------------------------------------------\r\nconfiguration\r\n---------------------------------------------------------------------\r\n\r\n#define ISADMIN 1 \/* global file administration *\/\r\n\r\nwith this option active, the library will maintain an internal table\r\nof active isam file descriptors, reuse system file handles when more\r\nthan one instance of the same isam file is opened, and include the\r\nisCleanUp call amongst the library entry points. admin is mandatory\r\nwhen the standard wrapper library or transaction processing are used,\r\nand definitely advisable if you plan to open more than one instance\r\nof the same file at any given time.\r\n\r\n\r\n#define ISAUDIT 1 \/* 0:off 1:active *\/\r\n\r\na value of one includes support for cisam standard audit trail\r\nlogging, see audit.ref for details.\r\n\r\n\r\n#define ISLOGGING 1 \/* 0:none 1:standard *\/\r\n\r\na value of one includes support for cisam standard transaction\r\nlogging and processing, together with a number of enhancements.\r\nsee trans.ref for more details. NOTE - to use this option you\r\nmust activate the ISADMIN feature. NOTE also that transaction\r\nprocessing is currently not supported under threads - this will\r\nbe resolved in the near future.\r\n\r\n\r\n#define ISVARIABLE 0 \/* 0:none 1:std 2:pack *\/\r\n\r\na value of one includes support for variable length records in the\r\nstandard cisam compatible configuration. a value of two provides\r\na better hash table algorithm and finer granularity with regard to\r\nthe use and reuse of slots in the variable length data storage nodes.\r\nboth one and two include support for data compression. see varlen.ref\r\nfor more details.\r\n\r\n#define ISOLDVARLEN 0 \/* 0: new v7.0 format *\/\r\n\/* 1: old disam\/c-isam format *\/\r\n\r\nthere was a limitation in the old disam\/disam96\/c-isam variable length\r\nin that the maximum record number that could be stored in the 3 char bytes\r\nallocated for storing varinfo and continuation node record numbers was \r\n16777216L. this limit has been removed but requires that old files \r\nare converted, see dvlrebld.ref via the dvlrebld utility prior to use.\r\n\r\n#define ISLOCKING 2 \/* 0:none 1:old 2:new 3:lck *\/\r\n\r\na value of zero will disable locking entirely, resulting in a single\r\nuser version of the library. locking one enables the original cisam\r\n(prior to version 4) locking algorithm. locking two is the current\r\n(standard) method used by cisam versions 4 and greater, may also be\r\nfaster on some platforms. locking three is compatible with the dos\r\n'third file' locking method, and is provided to allow 'lowest common\r\ndenominator' NFS concurrency with dos based applications. locking\r\none and three rely on the lockf() system call, and two requires fcntl().\r\n\r\n\r\n#define ISDUPLOCKS 1 \/* honour locks in dup opens *\/\r\n\r\ncisam allows the same file to be opened more than once in EXCLLOCK\r\nmode within the same process. it also permits the same record to\r\nbe locked more than one under different filehandles within the same\r\nprocess, not to mention that it is also legal to erase a file that\r\nis already open in the current process, after which point any data\r\nwritten to the file will evaporate. set this to zero for cisam\r\ncompatible operation, but please be careful..\r\n\r\n\r\n#define ISDECLARE 1 \/* include prototypes *\/\r\n\r\nif non zero then full ansi standard function prototyping is enabled.\r\n\r\n\r\n#define ISDATAVOID 0 \/* void data pointers *\/\r\n\r\ncisam insists that all record pointers passed must be char type.\r\nif ISDATAVOID is set to one, they will be declared as type void\r\nwhich, under some compilers, will allow you to pass anything with-\r\nout warnings. this feature is compiler dependent.\r\n\r\n\r\n#define ISCUSTOM 0 \/* custom key types *\/\r\n\r\nthis option allows the addition of custom key types - refer to\r\ncustkeys.ref for more details.\r\n\r\n\r\n#define ISBERKELY 0\t \/* 0:memcpy() 1:bcopy() *\/\r\n\r\na value of one uses the berkely memory handling functions bcopy()\r\nand bcmp() and covers for the absence of memset() internally. a\r\nvalue of zero uses the default memcpy(), memcmp() and memset()\r\ncalls.\r\n\r\n#define ISLONGID 0 \/* allows for long pids *\/\r\n\r\na value of 1 will override the C-ISAM \/ X\/OPEN spec that forces\r\nshort integer values to be stored in the transaction processing logfile\r\nand audit trail file for pids and uids. WARNING: do not set to 1 \r\nif you are expecting C-ISAM\/X\/OPEN concurrency or file compatibility\r\nor if the process ids returned from the systems getpid() function are\r\nshort values.\r\n\r\n\r\n#define ISIDXBLK 1024 \/* default index block size *\/\r\n\r\nthe default index block size to be used when creating isam files.\r\n512 and 1024 are the usual standards. 512 is compatible with older\r\nversions of cisam, while 1024 seems to be most common value, and\r\nis compatible with current cisam files. 1024 will be enforced when\r\nbuilding variable length files, but you can still use other values\r\nfor your regular data.\r\n\r\n\r\n#define ISDUPLEN 4 \/* default duplicate width *\/\r\n\r\nthe width of the field used to store the duplicate sequence numbers\r\nin the index. a value of 4 will permit approximately 2000 million\r\nidentical keys in any given index, while 2 imposes a limit of just\r\nover 32500. 4 is more expensive in terms of disk space, so you may\r\nwish to consider using 2 if this is important and you not intend to\r\ngo over the limit. bear in mind that the limit applies to the max\r\ncount of an individual identical key, not to the total number of\r\nduplicates in the index. 4 is compatible with current cisam, 2\r\nwith older versions.\r\n\r\n\r\n#define ISMAXIDX 10 \/* indexes per file *\/\r\n#define ISMAXPARTS 10 \/* parts per key *\/\r\n#define ISMAXKEY 128 \/* bytes per key *\/\r\n\r\nthese should be fairly obvious, and refer to the number of indexes\r\nper file, the number of parts per index, and the total allowable byte\r\ncount per index key. the value of ISMAXPARTS is also available via\r\nthe standard NPARTS define.\r\n\r\n\r\n#define ISMAXBUF 20 \/* buffers per index *\/\r\n\r\nthis is actually a slight misnomer in that the root node is always\r\nbuffered, so the resultant number of memory allocations will actually\r\nbe one more than the number you specify here. one important caveat\r\napplies - you must specify a value that is at least twice the expected\r\ndepth of the largest expected index tree. **Note: should you encounter\r\nan ISFATAL error: fatal isam error iscomp.c(68) the value of ISMAXBUF\r\nshould be increased and the entire library recompiled before attempting\r\nto continue. \r\n\r\n\r\n#define ISERRBASE 100 \/* start error codes at *\/\r\n\r\nthe library generated iserrno values usually start at 100. on\r\nsome systems this conflicts with system generated errno values.\r\nyou can use this define to change the start point.\r\n\r\n\r\n#define ISTHREADED 0\t \/* threadsafe handling *\/\r\n\r\nplease refer the thread.ref for details if you plan to use this.\r\n\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span352\" onclick=\"faq_changesrc2(22)\"><div onclick=\"hits(35,2,22);edit_title(1,35,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >key compression<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl222\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content35\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>key compression<\/strong>\r\nCOMPRESS\/LCOMPRESS\/TCOMPRESS \r\n\r\nISKCOMP 0\r\ndue to fixed index file format specifications, a single char is used\r\nto store the number of leading compressed bytes and another to store\r\nthe number of trailing compressed bytes. this forces a limitation\r\nof 255 bytes ( max unsigned char ) for compressed key size,\r\nregardless of ISMAXKEY setting to ensure full compression of all\r\ntrailing spaces or nulls for TCOMPRESS, and all leading duplicate\r\ncharacters for LCOMPRESS.\r\n\r\nISKCOMP 1\r\nallows compressed key sizes larger than 255 bytes, but will only\r\npermit partial compression on leading and trailing characters.\r\na maximum of 255 leading duplicate characters, and 255 trailing \r\nspaces or nulls will be compressed.\r\n\r\n\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span362\" onclick=\"faq_changesrc2(23)\"><div onclick=\"hits(36,2,22);edit_title(1,36,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >transparent file links<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl223\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content36\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>transparent file links<\/strong>\r\n-------------------------------------------------------------------\r\n\r\nwhen building, opening, renaming or erasing isam files, the library\r\nwill first check for the existence of a .lnk file in the specified\r\npath. this is a text file that is expected to contain the physical\r\npath for the associated isam file in the first line. the remainder\r\nof the file contents is ignored.\r\n\r\nfor instance, if you create a file called sample.lnk in directory\r\ntestdata with \"mydata\/temp\" in the first line, then attempt to open\r\n\"testdata\/sample\", the library will bypass any existing sample file\r\nin testdata and open mydata\/temp instead.\r\n\r\nlinking is not recursive - the only place the library will look for\r\na link is on the original path passed to the associated isam call.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span372\" onclick=\"faq_changesrc2(24)\"><div onclick=\"hits(37,2,22);edit_title(1,37,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >index masking<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl224\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content37\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>index masking<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nindex masking is a mechanism through which the application can control\r\nwhich indexes a given record will be stored in. usage is relatively\r\nsimple, and best explained by example.\r\n\r\nmasked files are created by adding ISMASKED to the mode when calling\r\nisBuild or isbuild, and are opened in the same way.\r\n\r\nthe library will return an EBADARG error if a masked file is opened\r\nwithout ISMASKED in the mode or ISMASKED is added to the open mode\r\non an unmasked file.\r\n\r\ngiven a file with three indexes, where a value of 1 represents the\r\nprimary, 2 the middle index, and 3 the last, the following call will\r\nadd a record to the primary index only:\r\n\r\nissetmask( isfd, ISMASK(2) + ISMASK(3) );\r\niswrite( isfd, record_data );\r\n\r\nto rewrite a record such that it will be masked in the primary:\r\n\r\nissetmask( isfd, ISMASK(1) );\r\nisrewrite( isfd, record_data );\r\n\r\nwhere isrewrite could also be isrewcurr or isrewrec.\r\n\r\nthe mask value for the current record can be obtained via a call to\r\n\r\nisgetmask( isfd );\r\n\r\nrecord masks must be set explicitly - if reading through a file with\r\nthe intention of adjusting mask values you must call issetmask for\r\neach record you wish to change.\r\n\r\nfiles built with masking active will allow multiple copies of\r\nidentical indexes to be added to the file. this is to allow the\r\ndeveloper to store different record subsets in separate indexes,\r\nbut it is important to note that only the *last* of these indexes\r\ncan be accessed via isstart - isindex should be used instead.\r\n\r\nBASE: if using the base ( file descriptor ) calls you should enquire\r\nand set the mask values directly, rather than using isgetmask\r\nand issetmask. for example:\r\n\r\nif( isam->mask & ISMASK(1) ) \/* current record masked in primary *\/\r\n\r\nisam->mask = ISMASK(2) + ISMASK(3); \/* mask 2nd and 3rd indexes *\/\r\n\r\n\r\nNOTES: masking is a custom extension - files built with ISMASKED are\r\nnot cisam compatible.\r\n\r\nyou should not remove indexes from a masked file once it has\r\nbeen populated.\r\n\r\nas of version 6.1, the flag in the index header that denotes\r\nmasked files has been changed - you will need to run fixflags\r\n(in the util directory) to patch older files.\r\n\r\nsee nullkeys.ref for an alternate method of filtering indexes.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span382\" onclick=\"faq_changesrc2(25)\"><div onclick=\"hits(38,2,22);edit_title(1,38,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >isam file mirroring reference<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl225\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content38\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>isam file mirroring reference<\/strong>\r\n--------------------------------------------------------------------------------\r\nisam file mirroring works by setting an environment variable BDMIRROR to\r\nthe full path of location of the mirror fileset.\r\n\r\nBDMIRROR will mirror to remote destinations if ISCLIENT is set to 1 in\r\nisconfig.h prior to compiling the Disam library. If the mirror files\r\nare on a remote machine the path of BDMIRROR must be prefixed with the\r\nip of the remote machine such as:\r\n\r\nBDMIRROR = \/\/209.99.99.9\/isamfilepath for unix platforms\r\n\r\n-or-\r\nBDMIRROR = \\\\\\\\209.99.99.9\\\\isamfilepath for DOS,Win or NT platforms\r\n\r\nThe mirror fileset must exist in the BDMIRROR location for mirroring to work.\r\nAll disam calls will be duplicated to the locale fileset as well as the mirrored\r\nfileset.\r\n\r\n--------------------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n--------------------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span392\" onclick=\"faq_changesrc2(26)\"><div onclick=\"hits(39,2,22);edit_title(1,39,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >null key masking<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl226\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content39\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>null key masking<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nit is possible to flag indexes such that null keys (those whose value\r\nequates to null) will not be added to the index, and the associated\r\nrecords will not be accessible via that index,\r\n\r\nthe default value used to determine if a given key is null is zero,\r\nbut this can be modified by adding the value (left shifted by eight)\r\nto the key type field.\r\n\r\nthe following code constructs a null key index in which a character\r\nfield containing all spaces will be considered null:\r\n\r\nkey->k_flags = ISDUPS + NULLKEY;\r\nkey->k_nparts = 1;\r\nkey->k_part[0].kp_type = CHARTYPE + ( 32 << 8 );\r\nkey->k_part[0].kp_start = 10; \r\nkey->k_part[0].kp_leng = 10;\r\n\r\nnull key indexes are not cisam compatible.\r\n\r\nsee mask.ref for an alternate method of filtering indexes.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span402\" onclick=\"faq_changesrc2(27)\"><div onclick=\"hits(40,2,22);edit_title(1,40,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >pure indexes<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl227\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content40\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>pure indexes<\/strong>\r\n---------------------------------------------------------------------\r\n\r\npure index files provide a method of managing key information without\r\nthe overheads required for full data handling. they offer advantages\r\nin speed and storage requirements, but are necessarily limited in\r\nother ways.\r\n\r\nboth isBuild and isbuild will create pure index files when passed a\r\nvalue of zero for the record length. the result is a single .idx\r\nsystem file - no .dat is created.\r\n\r\npure index files consist of the primary index only - you may not add\r\nsecondary indexes.\r\n\r\nonly the fields pointed to by the key description will be stored and\r\navailable for retrieval.\r\n\r\nthe current value of isrecnum will be stored on writes and updates\r\nand will be returned on read. since the global isrecnum normally \r\ncontains the data record number, in the case of pure index files where\r\nthere are no data records, the following pure idx iswrite will inherit\r\nwhatever the current isrecnum value is. to allow for the user application \r\nsetting isrecnum, or to allow the current value to be herited set ISPURE\r\nin isconfig.h to 0, this is the current default setting.\r\nif the preference is for disam to assign an incremented isrecnum value\r\nprior to iswrite set ISPURE to 1 in isconfig.h\r\n\r\nrecord locking is not possible, and pure indexes may not be opened in\r\nautolock mode.\r\n\r\nyou cannot delete or rewrite by record number.\r\n\r\npure indexes cannot be rebuilt or repaired if damaged, so should not\r\nbe used for critical data.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span412\" onclick=\"faq_changesrc2(28)\"><div onclick=\"hits(41,2,22);edit_title(1,41,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >auto file corruption repair<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl228\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content41\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>auto file corruption repair<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nindex and data file corruptions can occurr if a running process is\r\naborted mid-stream or if a system failure occurs.\r\n\r\noften running dcheck -b or dpack after such a failure can be time\r\nconsuming if the effected files are large, not to mention dcheck or dpack\r\nmust be run manually for each isam file, first to determine the file \r\nstatus and then to repair any corruptions.\r\n\r\nby setting ISREPAIR to 1 in isconfig.h prior to compiling the library,\r\nDisam will maintain data record images of records being updated,\r\nfor the duration of the update. if the update concludes successfully\r\nthe image is removed from the file system, however if a system failure\r\noccurs the data image remains on the file system and Disam uses these\r\nimages to check and repair the effected index\/data records.\r\n\r\nthis removes the need to rebuild the entire isam file manually, which\r\ncan be time consuming.\r\n\r\nto enable the auto repair facility:\r\n\r\nset ISREPAIR to 1 in isconfig.h prior to compiling the Disam\r\nlibrary\r\n\r\nset the repair file path in isport.h - see #define reppath\r\n\r\nthis tells Disam where to store the data record image files\r\nthese files are named as: .rep and are of the format\r\n\r\nshort int - isam filename\/path length\r\nshort int - data image length\r\nlong int - data record number\r\nchar string - isam filename\/path\r\nchar string - isam data record image\r\n\r\nafter a system failure all corrupted isam files will be automatically\r\nrepaired simply by ensuring a call to isStartup() - base, or isstartup()\r\n- wrap, is included in the application's main startup program prior\r\nto opening any isam files. since only one call to isStartUp()\/isstartup()\r\nis enforced, and since absolutely no isam files should be opened or already\r\nopen at the time isStartUp()\/isstartup() is called the application should\r\nensure that only one application routine performs the startup\/repair.\r\n\r\nthe following restrictions apply:\r\n\r\ni) at no time should isstartup() be called if other processes\r\nare accessing or have open any isam files\r\n\r\nii) only one process should call istartup() immediately after\r\nthe system has recovered\r\n\r\niii) at no time should the .rep files be manually removed, unless\r\ndcheck -b or dpack is used in place of calling isstartup()\r\n\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span422\" onclick=\"faq_changesrc2(29)\"><div onclick=\"hits(42,2,22);edit_title(1,42,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >DISAMv7.0 schema manipulation routines<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl229\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content42\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>DISAMv7.0 schema manipulation routines<\/strong>\r\n---------------------------------------------------------------------\r\nint isStSchema( IsFile *isam, char *loadfile )\r\n---------------------------------------------------------------------\r\n\r\nstore schema definitions from loadfile to the isam file\r\n\r\nisam\tisam file descriptor\r\nloadfile file containing a schema layout or a file containing a list\r\nof schema layout filenames\r\n\r\nif there are multiple record definitions such as is the case with C\r\nunion usage in record definitions, loadfile can be a file with the\r\nnames of the different schema layout files\r\n\r\nif loadfile is a schema layout DISAM\/DB expects the word 'structure'\r\nto precede the actual layout, for example:\r\n\r\nstructure\r\nfield1 type\tformat\tlength\r\nfield2\r\n.\r\n.\r\n\r\n---------------------------------------------------------------------\r\nint isLdSchema( IsFile *isam, char *path )\r\n---------------------------------------------------------------------\r\n\r\nload schema definitions stored in the isam file to flat files in\r\npath\r\n\r\nisam\tisam file descriptor\r\npath\tpath to place schema layout definitions stored in isam file\r\n\r\n---------------------------------------------------------------------\r\nint isDpSchema( IsFile *isam )\r\n---------------------------------------------------------------------\r\n\r\ndump any schema layouts stored in isam file to stdout\r\n\r\nisam\tisam file descriptor\r\n\r\n---------------------------------------------------------------------\r\nint isRmSchema( IsFile *isam )\r\n---------------------------------------------------------------------\r\n\r\nremove any schema layouts stored in isam file\r\n\r\nisam\tisam file descriptor\r\n\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span432\" onclick=\"faq_changesrc2(30)\"><div onclick=\"hits(43,2,22);edit_title(1,43,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >status variables<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl230\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content43\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>status variables<\/strong>\r\n---------------------------------------------------------------------\r\n\r\ncisam implements a bank of four char fields named isstat1 through\r\nisstat4, primarily for use by isam based COBOL programs.\r\n\r\nthey are declared and initialised in the wrapper library, but the\r\ncode makes no attempt to set or modify the values.\r\n\r\n---------------------------------------------------------------------\r\nWorldwide Copyright (c) Byte Designs Ltd (2009)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span442\" onclick=\"faq_changesrc2(31)\"><div onclick=\"hits(44,2,22);edit_title(1,44,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >bench test source<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl231\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content44\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>bench test source<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nthe test directory contains four stand-alone executables which you\r\nmay find useful for reliability or performance testing, or as a\r\nsample of the standard wrapper interface usage.\r\n\r\nall three depend on bench.h and bench.c in the same directory.\r\n\r\nauto.c essentially a loose collection of calls that will build,\r\nadd and delete indexes, write, read and delete pseudo\r\nrandom data records, and check the results. useful for\r\ntesting the integrity of your compiled library. the\r\nstandard auto run is 500 records, but this can be\r\nchanged by specifying a different count on the command\r\nline.\r\n\r\nlock.c test record locking - will build and populate a sample\r\ndata file (if not found in current directory) and then\r\nloop through the data, locking a sequential subset of\r\nthe records.\r\n\r\nmult.c cyclic add\/update\/delete test intended for checking the\r\nindex locking and multi-user features.\r\n\r\nuser.c an undocumented and simplistic command line interactive \r\ntest engine used to verify specific operations. it is a\r\nlong way from complete yet, but might prove useful if\r\nyou are able to figure it out. the support department\r\nmay ask you to run it as a means of checking that your\r\ncompiled library is operating correctly.\r\n\r\nuser now includes the ability to make system calls (sys)\r\nand can run simple scripts (run).\r\n\r\nauto and mult will use varlen data if -v is passed on the command\r\nline, and will add compression to same if -vc is used.\r\n\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span452\" onclick=\"faq_changesrc2(32)\"><div onclick=\"hits(45,2,22);edit_title(1,45,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >transaction processing<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl232\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content45\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>transaction processing<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nwe have attempted to provide a transparent implementation of the\r\ntransaction processing routines provided by cisam. the library\r\nshould perform as specified in the cisam manuals, but includes\r\na few additional enhancements.\r\n\r\nwe are not certain that we have identified the log file locking offsets\r\nproperly. there is a possibility that the library will not co-operate\r\nin concert with cisam, but we have not found any problems to date.\r\n\r\ntransaction processing is activated via ISLOGGING in isconfig.h\r\n\r\nthe overlapping transactions option has been modified, and issusplog\r\nand isresumlog have been discontinued - see overlapping transactions\r\nfor more details.\r\n\r\nNOTE: please ignore references to multi-thread support in the\r\nfollowing - we are currently working on a revision, but\r\nthis is not yet available. please let support know if\r\nthis is a problem to you, and we will add you to the list\r\nof people to notify when it is ready.\r\n\r\n\r\n----------------------------------------------------------------------\r\nfunction calls reference\r\n----------------------------------------------------------------------\r\n\r\n----------------------------------------------------------------------\r\nint islogopen( char *name )\r\n----------------------------------------------------------------------\r\n\r\nopens log file. once the log file is opened all subsequent operations\r\non all files will be logged until the log is closed or suspended. each\r\nprocess is responsible for opening a log file. usually all processes\r\nwithin an application will open the same log file. access is governed\r\nby concurrency locks to prevent simultaneous writes, but this feature\r\nmight not be compatible with cisam. files opened\/built with ISNOLOG\r\nin the mode will not be logged.\r\n\r\n\r\n------------------------------------------------------------------\r\nint islogclose( void )\r\n------------------------------------------------------------------\r\n\r\ncloses log file for the process. all subsequent operations will not\r\nbe logged.\r\n\r\n\r\n------------------------------------------------------------------\r\nint isbegin( void )\r\n------------------------------------------------------------------\r\n\r\ndefines the beginning of a set of operations on all files opened with\r\nISTRANS in the mode argument. this set of operations is known as a\r\ntransaction.\r\n\r\nall records updated within the transaction will remain locked to ensure\r\nno other process can affect the results. in multi-user situations it\r\nis important to keep the time spent within a transaction to a minimum\r\nto avoid impacting on other processes' access to the records involved.\r\n\r\nall calls to isclose within the transaction will be deferred to avoid\r\nreleasing the locks mentioned above. if the same file is reopened\r\nwithin the same transaction you will simply get the same file handle\r\nback.\r\n\r\nall updates affect the data file immediately. if the process should\r\nterminate before completing the transaction, the changes will remain\r\nunless isrecover is used to rebuild the data from the last backup.\r\n\r\n\r\n------------------------------------------------------------------\r\nint iscommit( void )\r\n------------------------------------------------------------------\r\n\r\ndefines the successful completion of a transaction. all locked\r\nrecords will be released and all deferred closes honoured.\r\n\r\n\r\n------------------------------------------------------------------\r\nint isrollback( void )\r\n------------------------------------------------------------------\r\n\r\ndefines the unsuccessful completion of a transaction. all updated\r\nrecords will be restored to their original state, all record locks\r\nreleased and all deferred closes honoured.\r\n\r\n\r\n------------------------------------------------------------------\r\nint isrecover( void )\r\n------------------------------------------------------------------\r\n\r\nused to rebuild a set of data files from an original condition by\r\nmeans of a common log file. islogopen() must be called first to\r\nopen the log.\r\n\r\n\r\n------------------------------------------------------------------\r\nusage reference\r\n------------------------------------------------------------------\r\n\r\ndata file recovery\r\n\r\nif, at the time a full data backup was made, the transaction log\r\nwas purged, then, provided all updating processes call islogopen()\r\nbefore making changes, it is possible to rebuild the data files\r\nfrom the backup and the log file.\r\n\r\nit is not necessary that files be opened with a mode of ISTRANS\r\nfor changes to be logged. files that are opened with a mode of\r\nISNOLOG will not be logged and will not be recoverable.\r\n\r\nto do so it is necessary to compile a recovery utility that will\r\ncall the following functions in order:\r\n\r\nislogopen( );\r\nisrecover();\r\nislogclose();\r\n\r\nthe recovery procedure will then be to restore the backup ( make\r\nsure not to overwrite the log file ) and run the recovery utility.\r\nthe utility should check the return from isrecover() to ensure no\r\nerrors occurred during recovery.\r\n\r\nit is also possible to implement incremental backups by this\r\nmethod. the log file can be backed up and purged on a regular\r\nbasis. to recover it will be necessary to restore the original\r\nbackup, then restore and run the recovery utility on each log\r\nfile in chronological order.\r\n\r\n\r\n------------------------------------------------------------------\r\ntransaction processing fundamentals\r\n------------------------------------------------------------------\r\n\r\nthe theory behind transaction processing is that a collection of\r\nchanges to a group of data files can be defined in such a way as\r\nto be able to undo these changes at any time during the operation.\r\n\r\nthe collection of changes is referred to as a transaction.\r\n\r\na sample program might best serve to illustrate. proper error\r\nchecking has been omitted to simplify:\r\n\r\n\/* post a sales invoice *\/\r\n\r\n#include \r\n\r\nint invcFile; \/* source invoice record file *\/\r\nint custFile; \/* customer master records *\/\r\nint tranFile; \/* accounting transaction file *\/\r\n\r\nmain()\r\n{\r\nislogopen( \"logfile\" );\r\n\r\ninvcFile = isopen( \"invoice\", INOUT + ISTRANS );\r\ncustFile = isopen( \"customer\", INOUT + ISTRANS );\r\ntranFile = isopen( \"transaction\", INOUT + ISTRANS );\r\n\r\nisstart( invcFile, ..., ISFIRST );\r\n\r\n\/* loop through invoices *\/\r\nwhile( isread( invcFile, invcrec, ISNEXT ) == SUCCESS )\r\n{\r\nisbegin(); \/* define transaction start *\/\r\n\r\nif(\r\npostCust() == SUCCESS \/* update customer master *\/\r\n&&\r\npostTran() == SUCCESS \/* create transaction record *\/\r\n&&\r\ndelInvc() == SUCCESS \/* delete invoice record *\/\r\n)\r\niscommit(); \/* successful, commit changes *\/\r\nelse\r\nisrollback(); \/* failed, erase changes *\/\r\n}\r\n\r\nisclose( invcFile );\r\nisclose( custFile );\r\nisclose( tranFile );\r\n\r\nislogclose();\r\n\r\nexit( 0 );\r\n}\r\n\r\n\r\nnote that the transaction processing logic will lock all records\r\nthat are changed within the transaction for the duration of the\r\ntransaction. in some instances it pays to keep the transaction\r\ncycle as short as possible to allow other processes access to\r\nthese records.\r\n\r\nnote also that those files whose changes are to be erased when\r\nisrollback is called must be opened with mode ISTRANS. changes\r\nwill still be logged for those that are not, but the transaction\r\nprocessing logic ignores them and will not undo any changes.\r\n\r\n\r\n------------------------------------------------------------------\r\noverlapping transactions\r\n------------------------------------------------------------------\r\n\r\nas an extension to the cisam standard, and also as a means of\r\nallowing flexible use of transaction processing within multi-\r\nthreaded applications, the library provides a mechanism for\r\nhandling multiple concurrent (or overlapping) transactions.\r\n\r\nmanagement centers around the use of a callback function provided\r\nby the application. in order to permit overlapping transactions\r\nyou must first call isTxnInit( callback ), where callback is the\r\nname of a routine that will return a short integer value that the\r\nlibrary will use to determine which operations belong to which\r\ntransaction.\r\n\r\nin a single threaded application the simplest method is to declare\r\na variable that is visible to all routines that handle transactions\r\nand to the callback function itself.\r\n\r\nfor example, assuming a simple nested transaction operation:\r\n\r\nstatic short txnid;\r\n\r\ntxnid = 1;\r\nisbegin();\r\nfor( account = 0; account < 5; ++account )\r\n{\r\n\/* update account master files *\/\r\ntxnid = 2;\r\nisbegin();\r\n\/* update account files *\/\r\niscommit() or isrollback();\r\ntxnid = 1;\r\n}\r\niscommit() or isrollback();\r\n\r\n\r\nin a multi-threaded application, assuming the intention is to\r\nallow atomic transactions within individual threads, you would\r\nhave the callback routine return the thread id value.\r\n\r\nNOTE: isrecover is NOT threadsafe and should only be used under\r\nsingle threaded circumstances, or at very least only when\r\nthere are no other threads working on isam files.\r\n\r\nNOTE: when implementing transaction processing in a client\/server\r\nenvironment the logfile MUST be opened as:\r\nisLogOpen\/islogopen( \"\/\/ip\/path\/logname\" );\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span462\" onclick=\"faq_changesrc2(33)\"><div onclick=\"hits(46,2,22);edit_title(1,46,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >variable length records<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl233\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content46\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>variable length records<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nrefer to install.ref for activation and configuration details.\r\n\r\nthe following is a list of the functional and programmatic differences\r\nbetween fixed length and variable length isam file handling.\r\n\r\nisreclen is a global integer used to pass variable length info around\r\nin much the same way as isrecnum.\r\n\r\nisaddindex\r\nthe parts of any key added must reside within the fixed length part\r\nof the record.\r\n\r\nisbuild\r\nyou can add ISVARLEN to the mode argument to create a varlen file.\r\nif so then the record length argument must define the maximum possible\r\nlength of the records. you must also set isreclen to the size of the\r\nfixed length header portion of the record. key fields can only reside\r\nin the fixed length portion. you can also use ISVARCMP in place of\r\nISVARLEN to specify that RLE compression be applied to the data.\r\n\r\nisvbuild \r\nisvbuild should be used in place of isbuild if you are creating\r\nvariable length files in a multithreaded environment - refer to\r\nthread.ref for details.\r\n\r\nisindexinfo\r\nif file is variable, the msb of di_nkeys will be set to indicate same.\r\ndi_recsize contains the maximum record size, the fixed length size is\r\nreturned in isreclen.\r\n\r\nisopen\r\nif the file is variable length you must use ISVARLEN in the mode, or\r\nelse isopen will return an EBADARG error. the converse is also true -\r\nif the file is not variable length, then specifying ISVARLEN will\r\nreturn the same error. if successful then isreclen will be set to the\r\nmaximum record length of the opened file.\r\n\r\nto get around the inconvenience of the above, you can use ISNOCARE\r\nin the open mode, in which case the file will be opened regardless\r\nof whether it is variable or fixed length. you can then check the\r\nopen mode value to determine which kind of file was opened. this\r\nis found in isam->openmode if you are using the base library calls,\r\nor loaded by means of isgetmode( int isfd, int *mode ) if using\r\nthe wrapper library.\r\n\r\nisread\r\nisreclen will be set to the actual size of the record just read.\r\n\r\nisrewcurr\r\nisrewrec\r\nisrewrite\r\niswrcurr\r\niswrite\r\nset isreclen to actual size of record before calling.\r\n\r\n---------------------------------------------------------------------\r\ncompression\r\n---------------------------------------------------------------------\r\n\r\nthe library provides optional RLE compression on the variable length\r\nportion of the data record. this is specified when creating the file\r\nby using a mode flag of ISVARCMP in place of ISVARLEN. note that\r\nISVARCMP and ISVARLEN are NOT additive - you must use one or the\r\nother, not both.\r\n\r\nonce a compressed varlen file has been created, you can use either\r\nISVARLEN or ISVARCMP when opening the file - either will work, and\r\nthe file will be opened in the appropriate mode.\r\n\r\nnote that RLE encoding is only valuable if your data has a fair\r\ndistribution of repeated zero (0), decimal zero (48), or space (32)\r\nbytes.\r\n\r\ncompression is transparent to the application - records are written\r\nand read as before.\r\n\r\ncompression is not cisam compatible.\r\n\r\n---------------------------------------------------------------------\r\nnotes\r\n---------------------------------------------------------------------\r\n\r\nthe check utility will analyse and test the variable length storage\r\nnodes and report statistics.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><\/li><li id=\"post-1236\" class=\"selected\" style=\"margin-left:2px !important\"><div class=\"post_top\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_right\" >\n\t\t\t\t\t\t\t\t\t\t  <a href=\"#\" class=\"post_ajax_title\"><span id=\"post_span472\" onclick=\"faq_changesrc2(34)\"><div onclick=\"hits(47,2,22);edit_title(1,47,2,'283841','283839')\"  class=\"post_title\" id=\"post_title2\" style=\"padding: 5px;background-color:#283841\">\n\t\t\t\t\t\t\t\t\t\t  <div class=\"ttext2\" id=\"ttext2\" >wrapper reference<\/div><div align=\"right\" class=\"tchangeimg\" id=\"tchangeimg2\"  style=\"padding-right: 6px;padding-left: 5px;\"><img src=\"http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style18\/style18b.png\"  id=\"stl234\" style=\"box-shadow:none;padding:0px;vertical-align: middle;\"\/><\/div><\/div><\/span><\/a>\n\t\t\t\t\t\t\t\t\t<\/div><\/div><div id=\"post_content47\" class=\"post_content\" style=\"padding-left:9px !important;\">\n\t\t\t\t\t\t\t\t\t  <div class=\"post_content_wrapper\" id=\"post_content_wrapper2\" style=\"background-image:url(http:\/\/www.isam.ca\/d7\/wp-content\/plugins\/spider-faq\/upload\/style19\/BG.png)\"><div class=\"post_right\" id=\"post_right2\"><div style=\"border-top:1px;\" class=\"atext\" id=\"atext2\"><pre>\r\n<strong>wrapper reference<\/strong>\r\n---------------------------------------------------------------------\r\n\r\nthe standard interface is provided in the form of a wrapper, and is\r\nintended to allow plug and play compatibility with existing cisam\r\n(or equivalent) application code. only the differences between the\r\nbase and wrapper interfaces are explained below - you should refer\r\nto the base library reference for the remaining details.\r\n\r\n\r\n---------------------------------------------------------------------\r\nthe integer handle wrapper\r\n---------------------------------------------------------------------\r\n\r\nthis interface is provided for those who prefer or require a cisam\r\ncompatible API. this interface will link transparently with existing\r\ncisam or cisam compatible application source, and should require no\r\nchanges to your code, other than to switch to the iswrap.h header.\r\n\r\nall modules that use the integer wrapper should include iswrap.h\r\n\r\nall function names are identical except that they use exclusively\r\nlower case letters.\r\n\r\nall parameters are identical except that an integer file handle is\r\nused in place of the IsamFile structure pointer, and except for the\r\nisbuild() call, which has the standard cisam arguments, whereas the\r\nbase version includes an extra argument for variable length support.\r\n\r\nall functions return 0 on success, or -1 on error, with the exception\r\nof isbuild and isopen, which return an integer file handle or -1 on\r\nerror.\r\n\r\nSUCCESS and ERROR are defined in the header and can be used to test\r\nthe returns from these calls.\r\n\r\nisrecnum, isreclen, iserrno and iserrio are global variables declared\r\nin the wrapper, defined as externals in iswrap.h and are maintained\r\nin the same way as defined for the equivalent isfd values in the base,\r\nand by the usual cisam standard.\r\n\r\nsince the base library maintains an individual set of these variables\r\non a per file basis, we have also provided a collection of four calls\r\nthat will return a pointer to the associated variable:\r\n\r\nlong *is_recnum( int isfd );\r\nint *is_reclen( int isfd );\r\nint *is_errno( int isfd );\r\nint *is_errio( int isfd );\r\n\r\nthese can be used to enquire or set values for individual files, and\r\nare not overwritten on each isam call made.\r\n\r\n\r\n---------------------------------------------------------------------\r\ncommon dictionary access\r\n---------------------------------------------------------------------\r\n\r\nchar *isdi_name( int isfd ); file name as used in isopen\/isbuild\r\nint isdi_datlen( int isfd ); fixed record length\r\nint isdi_curidx( int isfd ); current index number (zero based)\r\nint isdi_idxfd( int isfd ); index file system handle\r\nint isdi_datfd( int isfd ); data file system handle\r\nstruct keydesc *isdi_kdsc( int isfd ); current key description\r\n\r\nisdi_name return a pointer to the file name string, or NULL if\r\nthe isfd value is invalid. the remainder return an integer value\r\nor -1 on failure.\r\n\r\n--------------------------------------------------------------------- \r\nWorldwide Copyright (c) Byte Designs Ltd (2009-2014)\r\n---------------------------------------------------------------------\r\n<\/pre>\n\t    \n\t\t\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t   <\/div><\/div>\n\t\t\t\t\t\t\t\t\t<\/li><div style=\"padding-bottom:5px\"><\/div><div style=\"padding-bottom:30px;\"><\/div>\t\t<\/ul>\t\t\n\t  <\/div>\n\t  <\/div>\n\t  <\/div> \t\n\n<script type=\"text\/javascript\">\n\tvar gaJsHost = ((\"https:\" == document.location.protocol) ? \"https:\/\/ssl.\" : \"http:\/\/www.\");\n\tdocument.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com\/ga.js' type='text\/javascript'%3E%3C\/script%3E\"));\n<\/script>\n<script type=\"text\/javascript\">\n\t\n\ttry {\n\t\tvar pageTracker = _gat._getTracker(\"UA-9222847-1\");\n\t\t\/\/ Cookied already: \n\t\tpageTracker._trackPageview();\n\t} catch(err) {}\n<\/script>\n<\/body>\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":4,"featured_media":0,"parent":54,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/pages\/154"}],"collection":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.isam.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=154"}],"version-history":[{"count":4,"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/pages\/154\/revisions"}],"predecessor-version":[{"id":158,"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/pages\/154\/revisions\/158"}],"up":[{"embeddable":true,"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/pages\/54"}],"wp:attachment":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}