[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

521.0. "Appending data to a hold file" by AYOU51::BRANNAGANS () Tue Jun 23 1992 06:22

Hello Focus people,

                  Can anyone help me with a Focus problem ?

 Firstly let me point out that I have been using for all of 4 weeks so my 
 knowledge is somewhat limited.

 Basically I'm trying to build up hold file containing data that will be
 used to produce a summary report.

 I've set the file definition up as follows

  FILEDEF SUBT DISK SUBT APPEND

  ......

  After selection etc...

   ON TABLE HOLD AS SUBT


   BUT... Each pass through seems to erase the last data and at the end I 
   only have the data from the final pass !

   Does APPEND work with HOLD files.


   HELP !!

   I believe I'm using version 6.1.A

   The previous note seems related but I need a data file, not a doc file.

   Thanks

          Steve.
T.RTitleUserPersonal
Name
DateLines
521.1VMS ?!?BIS1::SCHYNSTue Jun 23 1992 09:042
    I don't konw if APPEND is working with HOLD files but in this case
    why don't you try with VMS APPEND SUBT.FTM XXX.FTM
521.2HOLD everything!AWASH::JBAMFORTHThu Jun 25 1992 13:2215
    
    
    Hi, 
    
    What are you doing differently in each pass that requires multiple
    passes?  Can't you incorporate the logic applied in your passes to 
    just one?  If it's just a matter of multiple selection conditions, 
    could use the WHERE command to handle them all. 
    
    The HOLD option does not support appending.  
     
    Provide more info on what you're doing, or include the code. 
    
    
    Joe  
521.3monthly versus YTDBIS1::SCHYNSFri Jun 26 1992 08:06150
I think I can understand the context.
    In the following LOGIC, I append monthly database to each other in
    order to get an year to date database.  Each month I get a monthly
    database called ABRINxx (xx = fiscal month) with limited size and quick
    to use.  For some reports, I need to have a quaterly overview.  The
    user can then select the monthly databases to be used.
    The extended database (much more larger) is called ABRIN.DAT/ABROUT.DAT
    
    In this example, the original database are already created but you can 
    insert some table creating HOLD files within the FEX (for instance if
    you want only some fields, not all, from the monthly databases). 
    
    
    
-*************************************************************
-* E_EXTEND.FEX   ABMRS CREATES ONE DATABASE WITH ALL MONTHS *
-*************************************************************

VMS DEL/NOLOG ABRIN.DAT;,ABROUT.DAT;
-RUN
-TYPE1
-TYPE0
-TYPE0 AVAILABLE DATABASE ARE :
-VMS DIR ABRIN*.DAT,ABROUT*.DAT
-VMS WAIT 00:00:02

-SET &OK1='N';
-SET &OK2='N';
-SET &OK3='N';
-SET &OK4='N';
-SET &OK5='N';
-SET &OK6='N';
-SET &OK7='N';
-SET &OK8='N';
-SET &OK9='N';
-SET &OK10='N';
-SET &OK11='N';
-SET &OK12='N';

-CRTFORM UPPER
-" "
-" "
-"<20  USE     JUL : <.T.&OK1"
-"<20          AUG : <.T.&OK2"
-"<20          SEP : <.T.&OK3"
-" "
-"<20          OCT : <.T.&OK4"
-"<20          NOV : <.T.&OK5"
-"<20          DEC : <.T.&OK6"
-" "
-"<20          JAN : <.T.&OK7"
-"<20          FEB : <.T.&OK8"
-"<20          MAR : <.T.&OK9"
-" "
-"<20          APR : <.T.&OK10"
-"<20          MAY : <.T.&OK11"
-"<20          JUN : <.T.&OK12"

-IF &OK1 EQ Y GOTO OK1;
-NEXT1
-IF &OK2 EQ Y GOTO OK2;
-NEXT2
-IF &OK3 EQ Y GOTO OK3;
-NEXT3
-IF &OK4 EQ Y GOTO OK4;
-NEXT4
-IF &OK5 EQ Y GOTO OK5;
-NEXT5
-IF &OK6 EQ Y GOTO OK6;
-NEXT6
-IF &OK7 EQ Y GOTO OK7;
-NEXT7
-IF &OK8 EQ Y GOTO OK8;
-NEXT8
-IF &OK9 EQ Y GOTO OK9;
-NEXT9
-IF &OK10 EQ Y GOTO OK10;
-NEXT10
-IF &OK11 EQ Y GOTO OK11;
-NEXT11
-IF &OK12 EQ Y GOTO OK12;
-NEXT12
-GOTO STARTNOW

-OK1
-VMS APPEND/NEW ABRIN01.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT01.DAT ABROUT.DAT
-GOTO NEXT1

-OK2
-VMS APPEND/NEW ABRIN02.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT02.DAT ABROUT.DAT
-GOTO NEXT2

-OK3
-VMS APPEND/NEW ABRIN03.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT03.DAT ABROUT.DAT
-GOTO NEXT3

-OK4
-VMS APPEND/NEW ABRIN04.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT04.DAT ABROUT.DAT
-GOTO NEXT4

-OK5
-VMS APPEND/NEW ABRIN05.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT05.DAT ABROUT.DAT
-GOTO NEXT5

-OK6
-VMS APPEND/NEW ABRIN06.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT06.DAT ABROUT.DAT
-GOTO NEXT6

-OK7
-VMS APPEND/NEW ABRIN07.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT07.DAT ABROUT.DAT
-GOTO NEXT7

-OK8
-VMS APPEND/NEW ABRIN08.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT08.DAT ABROUT.DAT
-GOTO NEXT8

-OK9
-VMS APPEND/NEW ABRIN09.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT09.DAT ABROUT.DAT
-GOTO NEXT9

-OK10
-VMS APPEND/NEW ABRIN10.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT10.DAT ABROUT.DAT
-GOTO NEXT10

-OK11
-VMS APPEND/NEW ABRIN11.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT11.DAT ABROUT.DAT
-GOTO NEXT11

-OK12
-VMS APPEND/NEW ABRIN12.DAT ABRIN.DAT
-VMS APPEND/NEW ABROUT12.DAT ABROUT.DAT
-GOTO NEXT12

-STARTNOW
-TYPE1
-TYPE0
-TYPE0   YOUR EXTENDED DATABASE HAS BEEN CREATED
-VMS WAIT 00:00:02
    
521.4GRIND::JBAMFORTHWed Jul 01 1992 14:2226
    
    Also, you might want to set-up these individual files to take advantage
    of FOCUS' database concatenation capability.  They would have to be 
    FOCUS databases, however.  
    
    Then, depending upon which files are needed in a request, you can use
    Dialogue Manager to dynamically build your USE statement, logically
    concatenating as many physical DB's as necessary. 
    
    e.g. assume &FISC_MON = 5  
    
    -GOTO FISCMON&FISC_MON
    
    
    -FISCMON5 
                 USE FM01.FOC AS FISCDB
                     FM02.FOC AS FISCDB
                     FM03.FOC AS FISCDB 
                     FM04.FOC AS FISCFB 
                     FM05.FOC AS FISCDB 
                 END 
    
    -GOTO TABLEREQUEST