[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

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

288.0. "problem with display" by CORREO::REPDIS () Thu Dec 07 1989 12:55

 
I made this fex but am having certain problem with it. Can you look at it
and tell me why it doesn't work the way I want it to.

!TEST_ADD_MODIFY
MODIFY FILE TEST_REP
CASE START
CRTFORM 
"THIS OPTION ADDS NEW RECORDS AND UPDATES EXISTING RECORDS </1"
"Instructions: </1"
"1. Enter data in following field"
"2. Use TAB to MOVE cursor"
"3. Press RETURN when finish "
"4. To EXIT from the option PRESS PF1 </1"
"Note: If record doesn't exist each fields displayed will be emptied"
"      If record exist data in each field will be displayed  </1"

"<10 Enter report name: <T.REPORT_NAME>"
"<10 Enter frequency: <T.FREQ>"
"<10 Enter username: <T.USERNAME> "

MATCH REPORT_NAME 
  ON NOMATCH TYPE  " THIS RECORD WILL BE ADDED TO DATABASE..."
  ON MATCH TYPE " THIS RECORD ALREADY EXIST...RECORD CAN BE MODIFIED"

  ON MATCH/NOMATCH CRTFORM LINE 10
   " REPORT DISTRIBUTION INFORMATION UPDATE </1"
   " --------------------------------------------------------------------------"
   "<.HD.REPORT_NAME  <.HD.FREQ    <.HD.USERNAME "
   " "
   " Desc: <T.DESC   "
   " COM:  <T.COM     Step: <T.STEP  "
   " Dest: <T.DEST    Dept: <T.DEPT   CC: <T.CC      "
   " Qty : <T.QTY   Ret. period:<T.RETENT_PER     Ret. #: <T.RETENT_NO "
   " -------------------------------------------------------------------------"
 MATCH REPORT_NAME FREQ USERNAME
 ON MATCH UPDATE *
 ON NOMATCH INCLUDE 
ENDCASE
 DATA


Look at what the program does!

I am going to enter a new report name

Enter Report Name: LINDA.RPT
Enter Freq : D
Enter Username : LINDA JOHNSON

It display this next: It should have at display the key field (?)

Display:

 ?                   ?                    ?
Desc:                                   STEP: 
COM:
Dest:           Dept:                   CC: 
Qty:            Ret_period:            Ret. #: 


Now I am filling in the fields 
?                   ?                      ?

Desc: THIS IS JUST A TEST                STEP: 010
COM: AGO_TEST
Dest: AGO13          Dept: IS            CC: 631
Qty:  1         Ret_period: 28          Ret. #: JKF007

Now I want to recall what I entered. (would like for it to display again
after I entered instead of taking me to the prompt field again.

Enter Report Name: LINDA.RPT
Enter Freq : D
Enter Username : LINDA JOHNSON

Now see displays this butw hat happen to the username,dept,cc,qty,ret period
and ret. # there empty?

LINDA.RPT              D                  ? 

Desc: THIS IS JUST A TEST                STEP: 010
COM: AGO_TEST
Dest: AGO13          Dept: ?             CC: ?
Qty:  ?              Ret_period: ?       Ret. #: ?

But if I enter the field again then it will give me the display with the
information in all the fields. Why is that?

Now let say I want to enter a another user for the same report

Enter Report Name: LINDA.RPT
Enter Freq : D
Enter Username : ALBA SOTO

It will display me the last one I entered. 

LINDA.RPT              D           LINDA JOHNSON

Desc: THIS IS JUST A TEST                STEP: 010
COM: AGO_TEST
Dest: AGO13          Dept: IS            CC: 631
Qty:  1         Ret_period: 28          Ret. #: JKF007

I reenter the key fields again, display me the following:

LINDA.RPT              D                  ALBA SOTO

Desc: THIS IS JUST A TEST                STEP: 010
COM: AGO_TEST
Dest: AGO13          Dept: ?             CC: ?
Qty:  ?              Ret_period: ?       Ret. #: ?

Why didn't it return the display with the fields empty, why only part
of the fields were displayed as before?

Can you help me with this problem?

thanks lj
T.RTitleUserPersonal
Name
DateLines
288.1Try this!EN::COYLETue Dec 12 1989 15:3341
    
  LJ,


     The reason it did not display the key fields in your first example
is that it is an add ( a nomatch condition) and therefore doesn't have
any data to display.  I think you can "activate" the field for display
by including the following:

   ON MATCH TYPE "THIS RECORD ALREADY EXISTS...RECORD CAN BE MODIFIED"
   ON NOMATCH COMPUTE
                       REPORT_NAME    = REPORT_NAME;
                       FREQ           = FREQ;
                       USERNAME       = USERNAME;

   ON MATCH/NOMATCH CRTFORM LINE 10
             .
             .
             .
  
   It is also recommended that you use conditional fields (one carat)
for data entry fields and conditional fields (2 carats) for turnaround fields.
Therefore, in your example I would change the entry fields to:
"<10   Enter report_name:  <REPORT_NAME  "
"<10   Enter frequency  :  <FREQ         "
"<10   Enter Username   :  <USERNAME     "

   and the turnaoround fields to (EX: Desc: <T.DESC>).


One other question is why your first match doesn't have the three fields
that are included in the second match.  I believe FOCUS will assume they are
there, if in fact, you have an S3 in your master file.


                            Hope this helps 



                              Kevin             
288.2Re-entering twice to get full displayCORREO::REPDISWed Dec 13 1989 08:355
    First thanks for giving attention to my problem. The displays work
    fine now but when I enter for the first time and then reenter it
    doesn't display the rest of the other fields but if I call it again
    then it will. Why is that?
    
288.3Master File Description?EN::COYLEWed Dec 13 1989 10:0916
    
    
      Not Sure,
    
        Can you include a copy of your master file description?  Or mail it
    to me.
    
                                              Thanks,
         
    
                                                KC