-                                 Contributions   L    This newsletter is a volunteer activity. There are no compensations givenD    to any author or editor. Articles and letters for publication areG    encouraged from anyone. They may include helpful hints, inquiries to D    other users, reports on DECUS and SIG business, summaries of SPRsJ    submitted to Digital, or any information of interest to users of eitherL    DATATRIEVE or 4th Generation Languages. However, this newsletter is not aG    forum for job and/or head hunting, nor is commercialism appropriate.   D    Machine readable input is highly desirable and machine-to-machineG    transfer of material is preferred, but most anything legible will be     considered for publication.  H    Please send contributions, or for further information, please contact
    either:  J       Editor, DATATRIEVE Newsletter                Joe H. Gallagher, Ph.D.I       c/o DECUS U.S. Chapter                                4GL Solutions I       Company 219 Boston Post Road, BPO2         10308 Metcalf, Suite 109 I       Marlboro, MA 01752                          Overland Park, KS 66212   J    Editorials and letters to the editor within the Wombat Examiner and 4GLG    Dispatch are solely the opinion of the author and do not necessarily E    reflect the views of the Digital Equipment Computer Users Society, J    Digital Equipment Corporation, or the author's employer. All editorialsI    are marked as "An Editorial"; letters to the editor always begin "Dear     Editor".       Table of Contents      DECUS U.S. Chapter G           SIGs Newsletter,    Volume     4, Number 12       August 1989 5           Wombat Examiner,    Volume    10, Number 12 P --------------------------------------------------------------------------------  I    Letter to the Editor...........................................DTR - 1 I    Atlanta DECUS Accent R Working Group News......................DTR - 4 I    INGRES Working Group Report for Atlanta Symposium..............DTR - 4 I    Analysis  of PIR Ballots.......................................DTR - 6 I    Digital's Response to DTR/4GL SIG Product Improvement Requests.DTR - 8 J    Some More String Functions for VAX-DATATRIEVE..................DTR - 11        About the authors...   L    Bart Z. Lederman works for System Resources Corporation in Cambridge, MA;L    he holds a Masters of Electri  cal Engineering in Solid State ElectronicsH    and Communications from Rennselaer Polytechnic Institute. Bart is theK    Library Committee and PDP-11 Working Group representative of the DTR/4GL I    SIG; a regular speaker at Symposia; the artist for the Wombat Examiner J    and 4GL Dispatch and special projects coordinator for the SIG; a memberG    of the DTR/4GL Executive Steering Committee; a 1984 recipient of the I    DATATRIEVE Greybeards Award; and the author of over 50 articles in the     DECUS Newsletters.     1                              Letter to the Editor     Dear Editor:   L    Here is a little function to pass along to all nascent Wizards: attach to$    a parent process from DATATRIEVE.  F    The code of the function is in BASIC, but those of you with FORTRANJ    should have no problem converting. MACRO-32 should not present too muchI    of a problem either, since the routine is mostly system service calls. *    The DTR function definition follows it.  0         FUNCTION Long BAS_Attach (String Prcnam)!             %Title   'BAS_ATTACH' 1             %SBTTL   'Attach to a parent process' :             %Ident   '1.0    22-FEB-1989     Jeff Chimene'  /             Option   Type          = Explicit & 3                      , Size        = Integer Long & 2                      , Size        = Real Double &*                      , INACTIVE    = SETUP  N             %Include 'STARLET'      %From %Library 'SYS$LIBRARY:BASIC$STARLET'N             %Include 'LIB$ROUTINES' %From %Library 'SYS$LIBRARY:BASIC$STARLET'N             %Include '$JPIDEF'      %From %Library 'SYS$LIBRARY:BASIC$STARLET'           Record Item_List_3#               Word    buffer_length                Word    Item_code "               Long    buff_address+               Long    return_length_address                Long    mbz                Long    buff         End Record Item_list_3  1             Declare Item_List_3     Itmlst      & 1                   , Long            Return_code & *                   , Word            Retlen  1             itmlst::buff_length               = 8 A             itmlst::buffer_address            = loc(itmlst::buff) ;             itmlst::return_length_address     = loc(retlen) 1             itmlst::mbs                       = 0            If prcnam = "" then /             itmlst::item_code = JPI$_MASTER_PID 3             Return_code = SYS$GETJPIW(,,,itmlst,,,)          Else(             itmlst::item_code = JPI$_PID9             Return_code = SYS$GETJPIW(,,prcnam,itmlst,,,) M         End If                                ! parent process name specified   $         If (Return_code and 1%) then2             Return_code = Lib$Attach(itmlst::buff)         End If  J         END FUNCTION Return_code              ! End of FUNCTION BAS_Attach  5    The MACRO linkage to be included in DTRFND.MAR is:   8         ; FN$ATTACH -         Attach to a parent process	         ;          ; No Output L         ; Input is a string descriptor containing a process name or null for         ; master	         ; -         $DTR$FUN_DEF FN$ATTACH, BAS_ATTACH, 1 ,         $DTR$FUN_OUT_ARG TYPE = FUN$K_STATUS         $DTR$FUN_NOVALUE         $DTR$FUN_NOOPTIMIZE I         $DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE, ORDER = 1          $DTR$FUN_END_DEF  H    The ATTACH function is useful if you want to use DATATRIEVE as a keptF    process. This allows you to pop between your main DCL session and aH    DATATRIEVE session. For example, your DCL session may be menu driven,K    with DTR one of its choices. If DTR is started as a sub-process, you can 0    re-attach to the menu without losing context.  ;         $ ! First, let's start DATATRIEVE as a sub-process:          $ SPAWN/PROC=DTR DTR         Process DTR spawned ,         Terminal now attached to process DTR         VAX DATATRIEVE V4.2 #         DEC Query and Report System          Type HELP for help           DTR> show dictionary:         The default directory is CDD$TOP.DTR$USERS.CHIMENE  3         DTR> ! Return control to our PARENT process 6         DTR> ! The null string says "return to parent"<         DTR> ! Anything else is assumed to be a process name         DTR> FN$ATTACH('')0         Control returned to process Jeff Chimene<         [Attached to DCL in directory DISK$SMTPMS:[CHIMENE]]           $ show proc/sub   E         9-JUN-1989 16:16:40:02      LTA3128             User: CHIMENE            Processes in this tree:            Jeff Chimene (*)         DTR   :         $ ! Now, return control to the DATATRIEVE session:         $ ATTACH DTR         DTR> show dictionary:         The default directory is CDD$TOP.DTR$USERS.CHIMENE           DTR> exit   C    The following DCL command file can be used to determine if a new C    DATATRIEVE session should be started or an existing one resumed:            $ dtr_Name := dtr 
         $!         $ 10$:0         $   Proc = F$Getjpi(F$Pid(Pid),"PRCNAM")$         $   If (Proc .EQS. dtr_Name)
         $then >         $   Write Sys$Output "[Attaching to kept dtr session]".         $   Define/Nolog Sys$Input Sys$Command          $   Attach "''dtr_Name'"         $   Goto Leave
         $Else )         $   If (Pid .NE. 0) then Goto 10$          $Endif
         $!>         $ Write Sys$Output "[Starting a new kept dtr session]",         $ Define/NoLog Sys$Input Sys$Command,         $ spawn/nolog/proc="''dtr_Name'" dtr
         $!         $ Leave:O         $ Write Sys$Output "[Attached to DCL in directory ''F$Env("Default")']"          $ exit  J    I've been using these routines for some time and found them to be quite
    useful.  K                                         May your context always be current,   4                                         Jeff ChimeneB                                         Carondelet Health Services7                                         Tucson, Arizona   I    [Editor's note: In the 1988 Spring PIR List (Volume 3, Number 7, March I    1988), PIR number S88-27 requests that Digital add a function to allow I    attaching to a process or sub-process. Jeff has fulfilled that request     very nicely!]    ;                   Atlanta DECUS Accent R Working Group News D          Winston Tellis, Accent R Working Group Chair, Fairfield, CT  L    We had a very productive symposium and our working group meeting laid theH    foundation for our Anaheim meeting. We came up with several excellentI    suggestions for proposed papers for Anaheim and they have in fact been L    submitted to our SIG. When we hear about their acceptance, we will informJ    you through this news  letter. The schedule will probably work for mostJ    companies to send their representatives for the day we are assigned for    all the Accent R sessions.   I    The new feature at Anaheim will be that instead of the 'Working Group' K    meeting, we have requested a 'town meeting' with vendor and users making D    up the panel answering questions from users. It should be a great-    opportunity to get your problems resolved!   L    We informed the users present about DECUSERVE and encouraged them to signE    up so that we may form a conference of our own and thereby have an G    ongoing dialogue with our peers. This is an excellent bulletin board <    application and we could certainly help each other a lot.  K    In the next newsletter, I hope to give you more info about DECUSERVE and .    the papers that will be offered at Anaheim.    ?               INGRES Working Group Report for Atlanta Symposium ?               Larry Hicks, INGRES Working Group Chair, Cary, NC   L    The formation meeting of the INGRES Working Group was held at the AtlantaF    Symposium as a Birds-of-a-Feather session. The initial meeting drewK    twenty-three attendees. We discussed my role in setting up the formation I    meeting and my willingness to serve as the initial chair. (I have nine G    years of active DECUS involvement and can help the Working Group get K    established quickly.) I voiced my major concern about chairing the group L    -- I am a Marketing Director for one of Relational Technology's preferred    consulting partners and VAR.   G    The group elected me as the chair. Relational Technology, henceforth F    called RTI, named Dave Kellogg as the Working Group Counterpart and%    Cynthia Pinkston as his alternate.   I    A call was made for volunteers for a Working Group steering committee. H    The steering committee would help formulate plans and run the WorkingH    Group. Several people expressed an interest in helping, but most felt/    they would need to talk to their management.   5    The Working Group established the following goals:   9         o   Encourage INGRES sessions at future symposia.   K         o   Establish an interface with the INGRES Users' Association. I am L             currently the chair of the IUA's DECUS Working Group; that link !             has been established.   :         o   Develop a Wish List and communicate it to RTI.    J         o   Coordinate the submission of IUA INGRES public domain programs-             and tools into the DECUS library.   K         o   Develop a flow of information into the newsletters and onto the              DECUServe system.   K    We determined to review these goals in Anaheim and update or revise them     as necessary.  H    For Anaheim, there are at least four INGRES sessions submitted. TheseI    include: a Working Group meeting; a RTI performance session (submitted L    under Data Management SIG); a Users' Panel (like the one in Atlanta); and@    a Wish List session. We intend to hold additional sessions asK    Birds-of-a-Feather sessions in the campground, or wherever is necessary, F    and for any hot topics that can not be accommodated in the sessions	    above.   C    We are trying to attract some of the IUA sessions to next year's L    symposia. It will take until Anaheim to coordinate most of that activity.  H    We started a Wish List at Atlanta. Unfortunately, I was unable to getK    into the campground on Friday afternoon until after the campgrounds were L    locked up. At the moment, I have not been able to locate what happened toJ    the list (the volunteer and interest sign up sheets were there also). IH    WOULD APPRECIATE IT, IF ANYONE WHO EITHER ENTERED AN ITEM OR READ THEI    LIST WOULD SEND ME ALL THE ITEMS THAT THEY REMEMBER FROM THE LIST. (My G    address is listed below.) Our plan with the Wish List is to have the I    Working Group members submit items and vote on the priorities at least E    once a year and possibly twice a year. At each symposium, we would L    present the current items and their rankings. Voting would probably occurI    away from symposia to allow the maximum participation by Working Group $    members, probably by mail ballot.  K    We have a volunteer to coordinate the program collection and submission. H    He is Sim Wright. At the IUA, there was some discussion of having theL    informal INGRES public domain software placed in a real software library.I    I think we can make the DECUS Library be this place. Sim and I will be A    investigating this more between now and the Anaheim Symposium.   E    I have developed an initial list of volunteer needs for the INGRES K    Working Group, so that we can meet our established goals and ensure that K    activity continues when any of the steering committee are overwhelmed at     work.  *    INGRES Working Group Steering CommitteeG           Chair                                             Larry Hicks G           Vice Chair                                               open G           Tape/Program Librarian                             Sim Wright G           Session Coordinator                                      open G           Wish List Coordinator                                    open G           Campground/BOF Coordinator                               open G           Newsletter/DECUServe Coordinator                         open G           Counterpart (from RTI)                           Dave Kellogg G           Alternate Counterpart                        Cynthia Pinkston G           IUA interface                                     Larry Hicks G           Alternate IUA interface                                  open       Other Volunteer Needs: ?           INGRES User Panel members for Anaheim and New Orleans 8           Session speakers for New Orleans and Las Vegas$           Newsletter article writers  C    With the exception of panel members and speakers, the only other G    volunteers who would need to attend DECUS regularly (at least once a J    year) are the Vice Chair, Campground/BOF coordinator, and Alternate IUA
    interface.   J    If you are interested in volunteering, please call me at (919) 460-9896L    between 9 and 5 Eastern time, or FAX me at (919) 460-8607, or write me at  "           Turn-Key Solutions, Inc.)           875 Walnut Street, Suite 275-17            Cary, NC 27511  J    I will discuss the effort and time commitments of each of the positionsL    or try to help you get your session or article prepared and submitted. IfL    you have suggestions for sessions, additional activities or other Working     Group issues, I welcome them.  B    A follow up report from the Working Group should be prepared in<    September. Until then, may your databases be uncorrupted.      2                            Analysis of PIR Ballots@              T. Chris Wool, PIR Coordinator, du Pont, Newark, DE  J    Product improvement requests (PIRs) are the process by which users giveL    feed-back to Digital regarding improvements in products. At the 1988 FallA    Symposium in Anaheim and by mail, users submitted requests for K    improvement. In the April 1989 issue of the Newsletter (Volume 4, Number -    8) , all PIRs and a ballot were published.   I    The statistical analysis of all ballots for all 20 product improvement H    requests for VAX-DATATRIEVE follows. The PIRs are order by decreasingE    total points. Also listed are the percent of ballots with positive K    points, the percent of ballots with negative points, the average points,aJ    and the standard deviation of points. See the article in the April 1989F    newsletter for a description of how points could be balloted for or    against a particular PIR.  <                                             Pct of    Pct ofP PIR                                Total    Ballots   Ballots   Avg Pts  Std DevP No.      PIR Description            Pts     Pos Pts   Neg Pts   Given     of Pts  N  7 Allow wildcards in dictionary    258       75.6     0.0       7.6       2.4    referencing commandsn  N  5 Implement Compiled procedures    228        6.2     2.2       7.9       3.7  N 10 Provide a center function in     196       73.3     0.0       5.9       2.8    the Report Writer  N  6 Add a case insensitive EQUAL     177       57.8     0.0       6.8       2.8    boolean operatort  N  2 Add an ELSE clause to the FROM   132       44.4     2.2       6.3       3.8    value expression   N  3 Implement a more generalized     123       40.0     0.0       6.8       2.6    scheme for establishing the    textual SET variables in theu    Report Writer  N  4 Implement a screen management    111       31.1     2.2       7.4       4.4     system internal to DATATRIEVE    which uses calls to VAXFORMSd    and replaces FMS and TDMS  N 20 Enhance time handling            110       37.8     0.0       6.5       2.5    capabilities for date fieldse  N 15 Add a screen painter to help     104       33.3     2.2       6.5       3.8    users set up Report Writer 
    layouts  N 14 Make graphics device             103       40.0     0.0       5.7       3.3    independent and "Board Room".
    quality   .!           PIR Analysis (con't)...   <                                             Pct of    Pct ofP PIR                                Total    Ballots   Ballots   Avg Pts  Std DevP No.      PIR Description            Pts     Pos Pts   Neg Pts   Given     of Pts  N  1 Add memory resident tables       102       37.8      2.2      5.7       3.7  N  8 Warn the user if a non-indexed    89       40.0      2.2      4.7       4.6    CROSS is being performedL  N 19 Support segmented keys in RMS     81       24.4      2.2      6.8       4.3    files  N 16 Separate Report Writer PRINT      62       24.4      2.2      5.2       4.2    elements with a single spacer  N 18 Allow field level                 62       33.3      2.2      3.9       2.7    access protection  N 17 Align SUM columns properly        56       31.1      0.0      4.0       2.3  N 12 Support the CDDL                  47       17.8      0.0      5.9       2.7    variant structure  N 13 Allow variables in PLOT TITLE     44       17.8      0.0      5.5       2.9  N  9 Support the full DATATRIEVE       36       17.8      2.2      4.0       3.2    syntax in Guide Mode   N 11 Add SET [NO] LEGEND to plots      10        6.7      0.0      3.3       1.5  G    Ballots were statistically analyzed for preference by CPU type (VAX,sJ    PDP-11, DECsystems) and by application type (Business EDP/MIS, SoftwareE    Development, Education, Engineering/Scientific, Office Automation, K    Service Bureau). The complete analysis has been presented to the DigitalfL    development groups. However, the small number in each subcategory and theJ    relative uniformity of ordering does not warrant the publication of the)    complete analysis by category of user.J  D    Only a comparison of how each of the largest subgroups ranked the    VAX-DATATRIEVE PIRs follows:t  O              All     VAX    VAX    EDP     Dev     OA      Eng      PDP     Edu P             Users   Users   DTR   Type    Type    Type    Type     Users    Type                             Users  P   Responses  45      44      43     28     19       18      12        8        7 Ranking'P   1           7       7       7      5      5        5       7        6        7P   2           5       5       5      7      6        7       5        5        3P   3          10      10      10      6      7       10       6        7       19P   4           6       6       6     10     10        6      14       10        6P   5           2       2       2      3     15        4      10       14       10P   6           3       3       3      2      4       15       3       20        4P   7           4       4       4      4      2       20       1        1        5P   8          20      20      20     15     20       14      20        3       17P   9          15      15      15     14      3        2       9       17        8P  10          14      14      14      1      1        8       2        2       16P  11           1       1       1     19     14        1      18        4       14P  12           8      19      19     20     17        3       4        9       20P  13          19       8       8      8      8       19      12       19       12P  14          16      16      16     17     18       18      15       16       15P  15          18      17      17     13     16       17      13       18       18P  16          17      18      18      9     19       13      17        8        9P  17          12      13      13     12     13       16      11       12       13P  18          13      12      12     18     12       12       8       15       11P  19           9       9       9     16     11        9      16       11        2P  20          11      11      11     11      9       11      19       13        1  )           All Users           - All UsersS)           VAX Users           - VAX Users 4           VAX DTR Users       - VAX-DATATRIEVE UsersA           EDP Type            - Business EDP/IMS Application Type E           Dev Type            - Software Development Application TypeeB           OA Type             - Office Automation Application TypeG           Eng Type            - Scientific/Engineering Application Typeh,           PDP Users           - PDP-11 Users:           Edu Type            - Education Application Type    F         Digital's Response to DTR/4GL SIG Product Improvement Requests?                John L. Henning, Digital Counterpart, Nashua, NH   L    Digital values the feedback we receive from customers through the ProductI    Improvement Request system. We use the feedback to help us plan future!G    versions, and we encourage customers to submit and vote on the PIRs.y  H    Specific responses follow from VAX DATATRIEVE, DATATRIEVE-11, and VAX    TEAMDATA.       Responses from VAX DATATRIEVE  I    For the short term, most of our attention is focused on completing theKG    next major release of VAX DATATRIEVE, which will contain support for6H    DECwindows and CDD/Plus (as has been discussed at previous symposia).K    But, please keep those requests coming in, They are important to us, and -    will remain in our project planning files.T  I    Attached are VAX DATATRIEVE Development Team's responses to the top 10T9    overall PIR vote getters, in order by number of votes.i  = S89-7     Allow wildcards in dictionary-referencing commands.I  D    This is a very viable request, and one which would supplement theJ    functionality of VAX DATATRIEVE. Since the item was so popular with theJ    PIR process, we will put it near the top of our list for inclusion in aL    future release. Note: wildcarding features in VAX DATATRIEVE would likelyH    be built upon the un  derlying capabilities of CDD/Plus dictionaries,    where they are available.  ( S89-5     Implement compiled procedures.  J    This request has been mentioned before , and Digital has responded thatF    it would be very difficult to implement. The current VAX DATATRIEVEK    architecture will not support this concept, and we feel that a change torE    allow compilation would significantly reduce the functionality and     flexibility of the product.  < S89-10    Provide a centering function in the Report Writer.  I    The idea is one which can benefit almost all users. The inclusion of acF    function such as report centering is one we are very interested in.  8 S89-6     Add a case-insensitive EQUAL boolean operator.  L    Similar to the CONTAINING operator, this new EQUAL operator would be veryC    valuable to the DTR user. We are very interested in its possibleI;    implementation, but are concerned with its behavior with K    internationalization issues such as data comparison consistency. We will 5    carefully look at this request in the near future.   : S89-2     Add an ELSE clause to the FROM value expression.  J    Again, a very valuable addition to the existing VAX DATATRIEVE product,D    and one which could be syntactically compatible with existing DTRK    expressions. We will actively look at this feature for a future release.s  N S89-3     Implement a more generalized scheme for establishing the textual SET)           variables in the REPORT WRITER.u  J    Because of the current VAX DATATRIEVE architecture, particularly aroundF    the report writer, but also including other PRINT commands, this isK    difficult to implement. We will examine this area when making any futureeC    report writer changes, but at this time it is unlikely to occur.t  O S89-4     Implement a screen management system internal to DTR which uses calls 1           to DEC forms and replaces TDMS and FMS.o  I    We are very interested in the support of the DECforms product, It is auJ    high priority for the future of VAX DATATRIEVE. Note, however, that anyF    new interface must live in conjunction to the existing FMS and TDMSH    interfaces, since these two existing products are still supported and?    have large customer bases, including DTR users. Our DECformsb@    implementation would attempt to provide a separate interface.  G S89-20    Enhance the time handling capabilities for USAGE DATE fields.   J    This is a highly-requested feature for VAX DATATRIEVE, particularly theK    ability to manipulate time within items like the PLOT statement, We willmC    actively look at this request for future enhancements to the DTR-3    architecture, particularly around the PLOT area.h  J S89-15    Add a screen painter to help users set up Report Writer layouts.  L    Thank you for your suggestion. We do not have any immediate plans in this    area at this time.i  D S89-14    Make graphics device-independent and "Board Room" quality.  K    With the popularity of workstations, the area of Graphics has once again J    come to the forefront with VAX DATATRIEVE users. We are very interestedB    in taking advantage of new graphical areas, particularly in theF    workstation area, DATATRIEVE would likely take advantage of qualityE    graphics capabilities already available in other products, through     appropriate open interfaces.p      Responses from DATATRIEVE-11g  J    The DATATRIEVE-11 Development group responded to the top 4 vote-gettersG    from the users who have PDP-11s. The responses are below in order oft    number of votes.g  8 S89-6     Add a case insensitive EQUAL boolean operator.  H    Provided that VAX DATATRIEVE implemented something along these lines,H    DTR-11 could do likewise for compatibility's sake. The implementationL    would be straightforward and could be accomplished without impacting poolL    too greatly, however it should be noted that this capability is there now3    with the creative use of some existing features.   ( S89-5     Implement compiled procedures.  F    DTR-11 is unable to do anything in this particular area. Due to theC    nature of the product's implementation this feature would not bes    feasible.  = S89-7     Allow wildcards in dictionary referencing commands.r  L    DTR-11 is unlikely to implement this request. It is non-trivial and thereL    is additionally an issue with the style of wildcarding being inconsistent!    within the PDP-11 product set.A  9 S89-10    Provide a center function in the Report Writer.i  L    We could certainly consider something such as this if VAX DATATRIEVE wereI    to do something similar. Again, it would be relatively straightforwardh#    and without much impact on pool.r        Responses from VAX TEAMDATA  I    VAX TEAMDATA Development Team responded to both of the PIRs which wereo    submitted for the product.t  @ S89-21    Allow TEAMDATA access to RMS files via any CDD record.  E    We find this an extremely interesting suggestion. We will strongly >    consider implementing this enhancement in a future release.  ; S89-22    Allow user define procedures to be used globally.   G    This enhancement would be very tricky to implement. However, we willT:    consider implementing this request in a future release.    =                 Some More String Functions for VAX-DATATRIEVE)E         Bart Z. Lederman, System Resources Corporation, Cambridge, MAs  F    In preparing the latest version of the DATATRIEVE/Fourth GenerationF    Languages SIG Library Tape which will be distributed as part of theE    Spring 1989 tape collections, I decided to put together all of theoF    functions which are available so far into one file. I "folded in" aL    number of functions which had been submitted previously by Don Stern, andI    decided to add a few more of my own. I have added five of the Run Timei    Library String functions.      FN$STR_ELEMENTo  J    The STR$ELEMENT function extracts parts of a character string which areC    separated by a fixed delimiter character. Consider the following     examples:  #     DTR> declare tstring pic x(20).h)     DTR> tstring = "aa,bb,cc,dd,ee,ff,gg"n.     DTR> print fn$str_element(0, ",", tstring)                 String     aa     .     DTR> print fn$str_element(l, ",", tstring)                 String     bb  .     DTR> print fn$str_element(5, ",", tstring)                 String     ff  .     DTR> print fn$str_element(8, ",", tstring)                 String#     %STR-W-NOELEM, no element found   C    The first two lines simply fill a sample string with a number of H    characters,all of which are separated by a single fixed character (inI    this case, a comma ","). The STR_ELEMENT function pulls out one of the J    "pieces" which is separated by the supplied string delimiter. The first2    element is number 0, the next is number 1, etc.  K    Note what happens if you specify an element which is past the end of the L    input string. Since DTR V4.2 requires the status to be passed back from aK    function, when there is an error it is passed back to DTR, and then back 
    to you.      FN$POS_EXTRACT   L    DATATRIEVE has an FN$STR_EXTRACT function, which calls STR$LEN_EXTR. ThisI    allows you to extract a substring specifying the starting position andrL    length. STR$POS_EXTRACT works the same way, except you specify a startingF    position and an ending position rather than a length. The followingB    examples are applied to the same sample TSTRING defined before.  .    DTR> print fn$str_pos_extract (tstring,6,8)                 POS/               EXTRACTt    ,cc  .    DTR> print fn$str_pos_extract(tstring,6,10)                 POSc               EXTRACT6    ,cc,d  .    DTR> print fn$str_pos_extract(tstring,3,10)                 POS                EXTRACTt    ,bb,cc,d       FN$STR_CASE_BLIND_COMPARE  K    DATATRIEVE does a number of string comparisons. When you have data wheremL    the case of the characters might vary but you want to match regardless ofG    case, you have to do a number of manipulations. You can convert bothdF    strings to upper case with FN$UPCASE, or you can use the CONTAININGJ    comparison, but these don't always meet the needs of every application.H    Building in the Run Time Library function lets you perform case blindF    comparisons, and check for strings which are longer or shorter than    others at the same time.k  9         DTR> print fn$str_case_blind_compare("abc","ABC")s           String         Comparison                     0v  9         DTR> print fn$str_case_blind_compare("abc","AbC")            String         Comparison                     0n  :         DTR> print fn$str_case_blind_compare("abc","ABcd")           String         Comparison                    -1t  :         DTR> print fn$str_case_blind_compare("abcD","ABC")           String         Comparison                     1         g6         DTR> print fn$str_case_blind_compare("","ABC")           String         Comparison                    -1t      FN$STR_FIND_FIRST_IN_SETa  J    The function STR$FIND_FIRST_IN_SET is an interesting one. You give it aL    set of characters to match, and it will search a string to find the first4    instance where any of the given characters occur.  <         DTR> print fn$str_find_first_in_set("abcdefg","bcd")
          FINDa
         FIRST            IN
           SETP                     2   =         DTR> print fn$str_find_first_in_set("abcdefg","abcd")r
          FINDy
         FIRST5           IN
           SET4                     1d     ;         DTR> print fn$str_find_first_in_set("abcdefg","cd") 
          FIND7
         FIRSTa           IN
           SET                      35  H    Another example of how this can be used is to parse " words" out of aC    line. I will define a sample string and a string containing wordAJ    "separators", and then parse them out. In this example I'm entering theK    position to subtract by hand so it will print out and you can see what's H    happening; in a procedure you would put the position into a variable.  '         DTR> declare tstring pic x(80).p8         DTR> tstring = "The quick,brown-fox;jumped+over"'         DTR> declare separate pic x(5).A         DTR> separate = " ,-;+"X=         DTR> print fn$str_find_first_in_set(tstring,separate)g
          FIND 
         FIRST0           IN
           SETp                     4d5         DTR> tstring=fn$str_pos_extract(tstring,5,8O)3         DTR> print tstring/                                         TSTRING4#         quick,brown-fox;jumped+over      =         DTR> print fn$str_find_first_in_set(tstring,separate)m
          FIND 
         FIRST            IN
           SET                      6      5         DTR> tstring=fn$str_pos extract(tstring,7,8O)          DTR> print tstring/                                         TSTRINGi         brown-fox;jumped+over     t=         DTR> print fn$str_find_first_in_set(tstring,separate) 
          FIND 
         FIRST            IN
           SET                      6     05         DTR> tstring=fn$str_pos_extract(tstring,7,8O)e         DTR> print tstring/                                         TSTRING          fox;jumped+overp  5    and so on until you have parsed out what you want.       FN$STR_FIND_FIRST_NOT_SET  4    There is a corresponding Run Time Library routineH    STR$FIND_FIRST_NOT_IN_SET, which works the same as the above functionI    except that it finds the first character which is not in the specified L    subset. Note that the name had to be truncated to keep it from going overK    a 31 character symbol length limitation in the VAX programming language.   <         DTR> print fn$str_find_first_not_set("abcdefg","cd")
          FIND8
         FIRST4
           NOT 
           SETe                     1O  =         DTR> print fn$str_find_first_not_set("abcdefg","acd") 
          FINDw
         FIRSTl
           NOTp
           SETU                     2,  =         DTR> print fn$str_find_first_not_set("abcdefg","abd") 
          FIND 
         FIRSTn
           NOTi
           SETa                     3a  J    The following are definitions inserted into DTRFND.MAR to add the above
    functions.   L         ; FN$STR_CASE_BLIND_COMPARE - Compare Strings Without Regard to CaseJ         ;                                                   B. Z. Lederman	         ; L         ; Output is a value in R0:    -1 if first string is less than secondO         ;                              0 if strings are equal (with blank fill) O         ;                             +1 if first string is greater than seconde	         ; )         ; Input is two strings to compareU  I         $DTR$FUN_DEF FN$STR_CASE_BLIND_COMPARE, STR$CASE_BLIND_COMPARE, 2 H            $DTR$FUN_OUT_ARG    TYPE = FUN$K_VALUE, DTYPE = DSC$K_DTYPE_L<            $DTR$FUN_HEADER     HDR = <"String"/"Comparison">N            $DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 1N            $DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 2         $DTR$FUN_END_DEF  A         ; FN$STR_ELEMENT - Extract  Delimited Element Substring.  J         ;                                                   B. Z. Lederman	         ; ,         ;  output is the selected substring.O         ;  input is the element number (starting with zero for the 1st element) A         ;           the delimiter string which separates elements7)         ;           and the source string   3         $DTR$FUN_DEF FN$STR_ELEMENT, STR$ELEMENT, 4 /            $DTR$FUN_OUT_ARG TYPE = FUN$K_STATUS ,            $DTR$FUN_HEADER  HDR = <"String">=            $DTR$FUN_IN_ARG  TYPE = FUN$K_TEXT, OUT_PUT = TRUE N            $DTR$FUN_IN_ARG  TYPE = FUN$K_REF, DTYPE = DSC$K_DTYPE_L, ORDER = 1O            $DTR$FUN_IN_ARG  TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 2 O            $DTR$FUN_IN_ARG  TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 3          $DTR$FUN_END_DEF  O         ;  FN$STR_FIND_FIRST_IN_SET - Find First Character in Set of Characters9J         ;                                                   B. Z. Lederman	         ;1=         ;  output is the position of the substring (a number) /         ;  input is a source string descriptor, D         ;  and a set of characters, any one of which may be matched.  H         $DTR$IFUN_DEF FN$STR_FIND_FIRST_IN_SET, STR$FIND_FIRST_IN_SET, 2.            $DTR$FUN_HEADER  HDR = <"In"/"Set">E            $DTR$FUN_OUT_ARG TYPE = FUN$K_VALUE, DTYPE = DSC$K_DTYPE_L O            $DTR$FUN_IN_ARG  TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 1uO            $DTR$FUN_IN_ARG  TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 2p         $DTR$FUN_END_DEF  H         ; FN$STR_FIND_FIRST_NOT_SET - Find First Character That Does Not5         ;                               Occur in Set,nJ         ;                                                   B. Z. Lederman	         ;d<         ; output is the position of the substring (a number).         ; input is a source string descriptor,@         ; and a set of characters, none of which may be matched.  M         $DTR$IFUN_DEF FN$STR_FIND_FIRST_NOT_SET, STR$FIND_FIRST_NOT_IN_SET, 2o7            $DTR$FUN_HEADER     HDR = <"Not"/"In"/"Set">nH            $DTR$FUN_OUT_ARG    TYPE = FUN$K_VALUE, DTYPE = DSC$K_DTYPE_LN            $DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 1N            $DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 2         $DTR$FUN_END_DEF  J         ; FN$STR_POS_EXTRACT - String extract               B. Z. Lederman	         ;u         ; output is a string/         ; input is an output string descriptor,s-         ;          an input string descriptor 4         ;          a starting position in the string4         ;          the ending position in the string  8         $DTR$FUN_DEF FN$STR_POS_EXTRACT, STR$POS_EXTR, 4/            $DTR$FUN_OUT_ARG TYPE = FUN$K_STATUSs,            $DTR$FUN_HEADER  HDR = <"String">=            $DTR$FUN_IN_ARG  TYPE = FUN$K_TEXT, OUT_PUT = TRUE O            $DTR$FUN_IN_ARG  TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 1mN            $DTR$FUN_IN_ARG  TYPE = FUN$K_REF, DTYPE = DSC$K_DTYPE_L, ORDER = 2N            $DTR$FUN_IN_ARG  TYPE = FUN$K_REF, DTYPE = DSC$K_DTYPE_L, ORDER = 3         $DTR$FUN_END_DEF lH    These five new functions are connected to DATATRIEVE by compiling and-    re-linking from a privileged account with:l            $SET DEFAULT DTR$LIBRARY         $MACRO DTRFND          $@DTRBLD    ?               Due to the large amount of material in this issuen  :                     Part 2 of the Spring 1989 Wombat Magic  9                      is postponed to the September issue.s