[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

320.0. "problem with update" by MAGOS::JOHNSON () Mon Mar 05 1990 10:02

Here is an actually example of problem:

=======================================================================
  Enter report name: LINDA.RPT
  Enter frequency:  D
  Enter username:  LINDA JOHNSON
========================================================================
  Desc: THIS IS JUST A TEST
  COM: TEST.COM                          Step: 010
  Dest: AGO13          Dept: IS          CC:   631
  Qty:  1              Ret. period: 365  Ret. #: ABC0001
 ========================================================================

This was a new record that I enter and report name didin't exist on the
database so it was included. Now I entered another username for the same
report.

=======================================================================
  Enter report name: LINDA.RPT     ! REPORT NAME & FREQ IS REPINFO
  Enter frequency:  D
  Enter username:  ALBA SOTO       ! USERNAME IS USERINFO
=======================================================================

 The system displayed me this:

  COM: TEST.COM                          Step: 010       ! REPINFO
  Desc: THIS IS JUST A TEST              Dest: AGO13     

 As you can see all information is display I will change DEST to SGO5


  Dept: IS          CC:   631            Qty:  1         ! USERINFO
  Ret. period: 365                       Ret. #: ABC0001
=======================================================================
 Now the system displays me the next portion and I will modify fields
 CC, Ret. period and Ret. # 

 So record will look like this:

=======================================================================
  Enter report name: LINDA.RPT       
  Enter frequency:  D
  Enter username:  ALBA SOTO        
  COM: TEST.COM                          Step: 010
  Desc: THIS IS JUST A TEST              Dest: SGO5   
  Dept: IS          CC:   630            Qty:  1     
  Ret. period: 14                       Ret. #: XXX0000
========================================================================
  Now I will recall the first record I enter now it show DEST as SGO5
  not AGO13. But rest of information is okay. Why is this happening.

=======================================================================
  Enter report name: LINDA.RPT
  Enter frequency:  D
  Enter username:  LINDA JOHNSON
  COM: TEST.COM                          Step: 010
  Desc: THIS IS JUST A TEST              Dest: SGO5  
  Dept: IS          CC:   631            Qty:  1 
  Ret. period: 365                       Ret. #: ABC0001
========================================================================

Since in the fex I have MATCH REPORT_NAME and FREQ. So if DEST is changed
it will effect all those with the same report name and freq. How can I make
it only look at a specific report? As you can see USERNAME is a unique field
but it belongs to another segment. All the rest of the field get updated okay
except DEST.

Can someone help me with this? 
T.RTitleUserPersonal
Name
DateLines
320.1Need more info.RUNTUF::IMFRAWed Mar 07 1990 16:433
    There could be a number of reasons but I'd have to see your Master
    File Descripton and .FEX  (or effected portion) to really get an idea
    of what is happening in your case.
320.2Need InformationPULPO::REPDISTue Mar 13 1990 09:0366
    Sorry for taking so long to answer but here is requested information
    you ask me for.
    
    Here is the .MAS

FILENAME=REPDIST,SUFFIX=FOC                                                   

  SEGNAME=REPINFO,SEGTYPE=S2

     FIELDNAME=REPORT_NAME,ALIAS=RNAM,FORMAT=A30,$                     
     FIELDNAME=FREQ,ALIAS=FREQ,FORMAT=A1,$                                         
     FIELDNAME=DESCRIPTION,ALIAS=DESC,FORMAT=A30,$                      
     FIELDNAME=STEP,ALIAS=STEP,FORMAT=A3,$                                 
     FIELDNAME=PROCEDURE,ALIAS=COM,FORMAT=A25,$
     FIELDNAME=DESTINATION,ALIAS=DEST,FORMAT=A5,      TITLE='DEST',$


  SEGNAME=USERINFO,PARENT=REPINFO,SEGTYPE=S1

     FIELDNAME=USERNAME,       ALIAS=USER,       A30,$
     FIELDNAME=DEPT,        ALIAS=,         A4,      TITLE='DEPT',$
     FIELDNAME=QUANTITY,ALIAS=QTY,FORMAT=A1,$                              
     FIELDNAME=CC,ALIAS=CC,FORMAT=A3,   TITLE='COST,CNTR',$
     FIELDNAME=RETENT_PER,ALIAS=RPERIOD,FORMAT=A5, TITLE='RETENT,PER',$             
     FIELDNAME=RETENT_NO,ALIAS=RNUMBER,FORMAT=A7, TITLE='RETENT,NO',$             


Here is the .FEX

MODIFY FILE REPDIST
CRTFORM NOCLEAR
" THIS OPTION WILL ADD OR UPDATE REPORT ON THE DATABASE </1"
"================================================================"
"  Enter report name: <REPORT_NAME"
"  Enter frequency: <FREQ "
"  Enter username: <USERNAME "
VALIDATE
TESTREP  = IF REPORT_NAME EQ ' ' THEN 0 ELSE 1;
TESTFREQ = IF FREQ EQ ' ' THEN 0 ELSE 1;
TESTUSER = IF USERNAME EQ ' ' THEN 0 ELSE 1;
ON INVALID GOTO TOP
MATCH REPORT_NAME FREQ
ON NOMATCH CRTFORM LINE 7
"=================================================================="
"  Desc: <DESC   "
"  COM:  <COM     Step: <STEP  "
"  Dest: <DEST    Dept: <DEPT                Cost Center: <CC      "
"  Qty : <QTY     Ret. period:<RETENT_PER    Ret. #: <RETENT_NO "
"==================================================================="
ON NOMATCH INCLUDE
ON MATCH CRTFORM LINE 7
"  Desc: <T.DESC>   "
"  COM:  <T.COM>   Step: <T.STEP>   Dest: <T.DEST "
ON MATCH UPDATE DESC COM STEP DEST
ON MATCH CONTINUE
MATCH USERNAME
ON MATCH/NOMATCH CRTFORM LINE 9
"  Dept: <T.DEPT>              CC: <T.CC>    Qty: <T.QTY>"
"  Ret. period:<T.RETENT_PER>                Ret. #: <T.RETENT_NO> "
"==================================================================="
ON MATCH UPDATE DEPT CC QTY RETENT_PER RETENT_NO
ON NOMATCH INCLUDE
DATA
END