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