[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
| Title: | FOCUS, from INFORMATION BUILDERS | 
|  | 
| Moderator: | ZAYIUS::BROUILLETTE | 
|  | 
| Created: | Thu Feb 19 1987 | 
| Last Modified: | Mon May 05 1997 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 615 | 
| Total number of notes: | 1779 | 
415.0. "Converting DTR to .MAS" by RDGE44::PARKERA (Alburto Frog says LIME milkshakes) Wed May 08 1991 06:53
DATATRIEVE TO FOCUS MAS DEFINITION
I'm having problems defining the DTR record def (shown below) into a Focus
MAS file.
I've spent most of my days reading through the Focus manuals and experimenting
with the various commands available in the Describing External Files chapter, 
but still to no avail.  Having covered areas such as Dummy parents and 
Primary/Secondary Keys, I feel as though I'm going round in circles. 
I assume that the 'OCCURS' clause may be used in Focus to cover the OCCURS in
the DTR definition?  
The main problem in my mind is the identification of the 'PARENT' field, 
(if indeed there is one).  Also the file type and the usage attributes are 
unclear.  
I've tried to specify the USAGE LONG as A4, A8, D4 and D8, the 4 character 
length fields bring up errors and I'm experiencing strange characters in 
some fields, when reporting on the record for all of these usage attributes. 
Otherwise the fields are appearing blank or containing zeros, even when I 
specify not equal to zero.  Data is present in the record.
REDEFINE RECORD HIST_PROJ_FILE_RECORD
01  HIST_PROJ_REC.
   03  HP_KEY0.                            <Primary Key>
      05  HP_ENTIT_Q	PIC X(11).         <Character string, Primary Key>
      05  HP_SERV_TYPE	PIC X(2).          <Character string> 
      05  HP_MEDIA_TYPE	PIC X(2).          <Character string>
   03  HP_IDS_HISTORY	OCCURS 24 TIMES.   <List>
      05  HP_IDS_HIST_MONTH	USAGE LONG.      <Number>
   03  HP_IDS_PROJ_M	OCCURS 12 TIMES.   <List> 
      05  HP_IDS_PROJ_MONTH	USAGE LONG.      <Number>
   03  HP_IDS_PROJ_B	OCCURS 12 TIMES.   <List>
      05  HP_IDS_PROJ_BV	PIC X(2).  <Character string>
   03  HP_SPS_HISTORY	OCCURS 24 TIMES.   <List>
      05  HP_SPS_HIST_MONTH	USAGE LONG.      <Number>
   03  HP_SPS_PROJ_M	OCCURS 12 TIMES.   <List>
      05  HP_SPS_PROJ_MONTH	USAGE LONG.      <Number>
   03  HP_SPS_PROJ_B	OCCURS 12 TIMES.   <List>
      05  HP_SPS_PROJ_BV	PIC X(2).  <Character string>
;
Any help in whatever shape or form, would be much appreciated.
Angela  
| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 415.1 | more info needed | HAMSTR::IMFRA |  | Thu May 09 1991 13:37 | 6 | 
|  |     
    It would appear to me that one must know the record type values for
    each of the record types you gave in your note.  Once I have these, 
    I think I can be of some help.
    
    jb
 | 
| 415.2 |  | RDGE44::PARKERA | Alburto Frog says LIME milkshakes | Fri May 10 1991 04:12 | 7 | 
|  |     
    Could you expand on 'record type values', exactly what is this
    referring to?
    
    Thank you
    
    Angela
 | 
| 415.3 |  | HAMSTR::IMFRA |  | Mon May 13 1991 12:46 | 14 | 
|  |     
    I believe a unique combination of your HP_SERV_TYPE and HP_MEDIA_TYPE 
    would be used as a record type indicator, indicating which of the   
    media-based records apply for a given full key value. 
    
    For mapping purposes in the Master, you need to determine which key
    values apply to each of the different records you're trying to
    describe. 
    
    Hope this doesn't cause further confusion. 
    
    Let me know when you determined the proper mapping.
    
    jb
 |