DataMuseum.dk

Presents historical artifacts from the history of:

RegneCentralen RC850

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RegneCentralen RC850

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦26f623d89⟧ TextFile

    Length: 21632 (0x5480)
    Types: TextFile
    Names: »OPDAT.CMD«

Derivation

└─⟦c252abf18⟧ Bits:30008917 RCTOAX RC TIME OG OMKOSTNINGS OVERSIGT ARBEJDSDISK
    └─⟦this⟧ »OPDAT.CMD« 

TextFile

*****************************************************************************
*    COMMANDO FILE TIL  RC TIME OG OMKOSTNINGS OVERSIGT                     *
*    NAVN : OPDAT.CMD     SIDST ÆNDRET   DATO: 86.02.21      KL..: 08.30    *
*    KALDES FRA START.CMD, T1.MEN OG T2.MEN                                 *
*****************************************************************************
set escape on
store '  ' to ok
use
set talk off
erase
? ' ***   RC TIME OG OMKOSTNINGS OVERSIGT OPDATERING     ***'
? ' --------------------------------------------------------'
? ' BLIV VENLIGST I NÆRHEDEN AF SKÆRMEN INDTIL DISKETTEN FRA'
? ' RC OMKOSTNINGS REGISTRERINGS SYSTEM DISKETTE B: ER SAT I'
? ' DISKETTE STATION B: '
? ' --------------------------------------------------------'
? ' 1. ER DER OVERFØRT NY TRANSAKTIONS-FILE ?'
accept '        TAST  JA  ELLER  FORTRYD  SÅ RETUR  ............ ' to ok
if !(OK) <> 'JA'
    erase
    return
endif
store '  ' to ok
? ' '
*
do while ok = '  '
ACCEPT ' 2. INDTAST ÅR OG MÅNED  (ÅRMD) FOR PERIODEN ........... ' TO PER
store $(per,1,2) to aar
store $(per,3,2) to maaned
if aar < '84'
   loop
endif
if aar > '98'
   loop
endif
if maaned < '01'
   loop
endif
if maaned > '12'
   loop
endif
store 'OK' to ok
enddo
store '  ' to ok
*
? ' '
? ' 3. KONTROL FOR TRANSAKTIONS-FILE PÅ DISKETTE A,  VENT !'
store "'TIME"+per+".TXT'" to navn
if .not. file(&navn)
   ? '***  TRANSAKTIONS-FILE IKKE PÅ DISKETTE A !    TAST RETUR'
   wait
   return
endif
*
? ' '
? ' 4. SÆT OMKOSTNINGS REGISTRERINGS SYSTEMDISKETTE B: MED'
? '    AJOURFØRT PERIODE LIG MED ÅRMD .....................:' , PER
? '    I DISKETTE STATION B:'
ACCEPT '    TAST  OK   ELLER   RETURN VED FORTRYD   ............ ' TO OK
if !(OK) <> 'OK'
   return
endif
*
store "'B:LISTE2DB.DBF'" to navn
if .not. file(&navn)
   ? '***  OMKOSTNINGS REG. LISTE2DB.DBF EJ OK  !   TAST RETUR'
   set console off
   wait
   set console on
   return
endif
*
? ' '
? ' 5. NU NULSTILLES DE GAMLE REGISTRE            ,  VENT !'
set talk on
? ' '
? '    6  FILER  SKAL DELETES  (SLETTES) !'
? ' '
*
DELETE FILE wprojekt.NDX
DELETE FILE wkodproj.NDX
DELETE FILE ckode2gr.NDX
*
use gout
copy to goutwork structure
use
delete file gout
rename goutwork to gout
use gout
*
use wprotime
copy to wprowork structure
use
delete file wprotime
rename wprowork to wprotime
use wprotime
index on projektnr to wprojekt
index on koder26 + projektnr to wkodproj
*
use cbelob
copy to cbelwork structure
use
delete file cbelob
rename cbelwork to cbelob
use cbelob
index on kode2grp to ckode2gr
*
? ' '
? ' 6. NU HENTES OG BEHANDLES DE NYE TRANSAKTIONER,  VENT !'
? ' '
use wprotime index wprojekt, wkodproj
append from TIME&per.TXT SDF for projektnr> '010000' .and. projektnr< '990000'
set talk off
? ' '
? '    BEREGN RESTTIMER                           ,  VENT !'
use wprotime index wprojekt
go top
store 0 to laste
store 0 to nulle
store 0 to ejnul
if .not. eof
  store T to LOPPE
endif
*
DO WHILE LOPPE
   store laste + 1 to laste
   replace primotim with primotim / 10
   replace periodetim with periodetim / 10
   replace ultimotim with ultimotim / 10
   replace plantim with plantim / 10
   if plantim > 0
      replace resttim with plantim - ultimotim
      store ejnul + 1 to ejnul
   else
      replace resttim with 0
      store nulle + 1 to nulle
   endif
   skip 1
   if eof
      store F to LOPPE
   endif
   loop
ENDDO LOPPE
*
? ' '
? '    antal læste transaktioner ................. '       , laste
? '    antal transaktioner med resttimer > 0 ..... '       , ejnul
? '    antal transaktioner med resttimer = 0 .. .. '       , nulle
? ' '
release LOPPE, laste, ejnul, nulle
*
? ' '
? ' 7. MÅNEDS VARIABLE DANNES FRA PERIODENS MÅNED ,  VENT !'
DO CASE
case Maaned = '01'
store 'store bubel01 to xudper' to felte1
store 'store bubel02 + bubel03 + bubel04 + bubel05 + bubel06 + bubel07 + ;
bubel08 + bubel09 + bubel10 + bubel11 + bubel12 to xudrest' to felte2
case Maaned = '02'
store 'store bubel02 to xudper' to felte1
store 'store bubel03 + bubel04 + bubel05 + bubel06 + bubel07 + bubel08 + ;
bubel09 + bubel10 + bubel11 + bubel12 to xudrest' to felte2
case Maaned = '03'
store 'store bubel03 to xudper' to felte1
store 'store bubel04 + bubel05 + bubel06 + bubel07 + bubel08 + bubel09 + ;
bubel10 + bubel11 + bubel12 to xudrest' to felte2
case Maaned = '04'
store 'store bubel04 to xudper' to felte1
store 'store bubel05 + bubel06 + bubel07 + bubel08 + bubel09 + bubel10 + ;
bubel11 + bubel12 to xudrest' to felte2
case Maaned = '05'
store 'store bubel05 to xudper' to felte1
store 'store bubel06 + bubel07 + bubel08 + bubel09 + bubel10 + bubel11 + ;
bubel12 to xudrest' to felte2
case Maaned = '06'
store 'store bubel06 to xudper' to felte1
store 'store bubel07 + bubel08 + bubel09 + bubel10 + bubel11 + bubel12 to ;
xudrest' to felte2
case Maaned = '07'
store 'store bubel07 to xudper' to felte1
store 'store bubel08 + bubel09 + bubel10 + bubel11 + bubel12 to xudrest' to ;
felte2
case Maaned = '08'
store 'store bubel08 to xudper' to felte1
store 'store bubel09 + bubel10 + bubel11 + bubel12 to xudrest' to felte2
case Maaned = '09'
store 'store bubel09 to xudper' to felte1
store 'store bubel10 + bubel11 + bubel12 to xudrest' to felte2
case Maaned = '10'
store 'store bubel10 to xudper' to felte1
store 'store bubel11 + bubel12 to xudrest' to felte2
case Maaned = '11'
store 'store bubel11 to xudper' to felte1
store 'store bubel12 to xudrest' to felte2
case Maaned = '12'
store 'store bubel12 to xudper' to felte1
store 'store 0 to xudrest' to felte2
otherwise
? ' ***  MÅNED  LIG MED ......................  , maaned    '
? ' ***  MÅNEDS CASE EJ OK  !!!!                TAST RETUR '
WAIT
RETURN
ENDCASE
store '  ' to ok
*
***
use wprotime index wprojekt
go bottom
store projektnr to bmax
? ' '
? ' 8. NU AKKUMULERES BELØBENE FRA B:LISTE2DB      , VENT !'
? ' '
? '    OPDATERET PROJEKTNUMMER KAN FOREKOMME FLERE GANGE,  '
? '    AFHÆNGIG AF ANTAL TILKNYTTEDE KONTONUMRE.           '
? '    STØRSTE PROJEKTNUMMER MÅ VÆRE .....................:', BMAX 
? ' '
***
use B:LISTE2DB INDEX B:PJKTOGR4
go top
store pjktogrp to enogle
store projektnr to eprojektnr
store $(kontonr,5,2) to ekontogrp
store kr:ultimo - kr:periode to ekrprimo
store kr:periode to ekrperiode
store kr:ultimo to ekrultimo
STORE T TO LOPPE
*
DO WHILE LOPPE
   ***
   USE WPROTIME INDEX WPROJEKT
   find &eprojektnr
   if # = 0
      ***
      use B:LISTE2DB INDEX B:PJKTOGR4
      find &enogle
      skip 1
      if eof
         store F to LOPPE
         loop
      endif
      if projektnr > bmax
         store F to LOPPE
         loop
      endif
      store pjktogrp to enogle
      store projektnr to eprojektnr
      store $(kontonr,5,2) to ekontogrp
      store kr:ultimo - kr:periode to ekrprimo
      store kr:periode to ekrperiode
      store kr:ultimo to ekrultimo
      loop
   endif
   store kode2 to bkode2
   store projektnr to bprojektnr
   store F to copdat
   store T to LOKKE
   *
   DO WHILE LOKKE
      if ekontogrp = '40'
         store T to copdat
      endif
      if ekontogrp = '41'
         store T to copdat
      endif
      if ekontogrp = '42'
         store T to copdat
      endif
      if ekontogrp = '43'
         store T to copdat
      endif
      if ekontogrp = '44'
         store T to copdat
      endif
      if ekontogrp = '45'
         store T to copdat
      endif
      if ekontogrp = '46'
         store T to copdat
      endif
      if ekontogrp = '47'
         store T to copdat
      endif
      if ekontogrp = '48'
         store T to copdat
      endif
      if ekontogrp = '73'
         store T to copdat
      endif
      if copdat
         *** se teksten til punkt 9 ***
         ? ' opdater projektnummer ' , eprojektnr
         store bkode2 + ekontogrp to cnogle
         ***
         use cbelob index ckode2gr
         find &cnogle
         if # <> 0
            replace kr with kr + ekrprimo
            replace kr:periode with kr:periode + ekrperiode
            replace kr:ultimo with kr:ultimo + ekrultimo
         endif
         if # = 0
            append blank
            replace kode2 with bkode2
            replace kontogrp with ekontogrp
            replace kr with ekrprimo
            replace kr:periode with ekrperiode
            replace kr:ultimo with ekrultimo
            replace budper with 0
            replace budrest with 0
            replace kode2grp with bkode2 + ekontogrp
         endif
      endif
      ***
      use B:LISTE2DB INDEX B:PJKTOGR4
      find &enogle
      skip 1
      if eof
         store F to LOPPE
         store F to LOKKE
         loop
      endif
      store pjktogrp to enogle
      store projektnr to eprojektnr
      store $(kontonr,5,2) to ekontogrp
      store kr:ultimo - kr:periode to ekrprimo
      store kr:periode to ekrperiode
      store kr:ultimo to ekrultimo
      if eprojektnr <> bprojektnr
         store F to LOKKE
      endif
      loop
   ENDDO LOKKE
loop
ENDDO LOPPE
*
? ' '
? ' 9. NU HENTES BUDGETTAL                         , VENT !'
? ' '
STORE T TO LOPPE
***
use cbelob index ckode2gr
go top
***
DO WHILE LOPPE
   store kode2grp to cnogle
   ***
   use dbudget index dkode2gr
   find &cnogle
   store F to copdat
   if # <> 0
      &felte1
      &felte2
      store T to copdat
   endif
   ***
   use cbelob index ckode2gr
   find &cnogle
   if # = 0
      QUIT TO '*** FEJL GENSKRIV BUDGET I CBELOB !!!'
   endif
   if copdat
      replace budper with xudper
      replace budrest with xudrest
   endif
skip 1
if eof
   store F to LOPPE
endif
loop
ENDDO LOPPE
*
release xudper, xudrest, LOPPE, lokke, copdat, bmax, bprojektnr, bkode2
release enogle, ekontogrp, eprojektnr, cnogle, ckrperiode, ckrultimo
release ekrprimo, felte1, felte2
*****************************************************************************
? ' '
? '10. NU OPRETTES PRINTFIL TIL OVERSIGTS LISTE    , VENT !'
? ' '
*****************************************************************************
*    løkke zlok = hovedløkke True, hvis ikke EOF på WPROTIME                *
*    løkke ztim = løkke TRUE, så længe timer dannes til printlinier         *
*    løkke zens = løkke TRUE, så længe samme kode2 i timer og ej eof        *
*    løkke zbel = løkke TRUE, så længe beløb dannes til printlinier         *
*    Hvis tekst ikke findes i FTEKST , så store ' -blank-' to ztekst        *
*    Først læses WPROTIME , der dannes en hovedlinie med tekst for kode2,   *
*                           derefter dannes linier for tilhørende kode6'er, *
*                           ved brud skiftes til                            *
*    læsning af cbelob   ,  der dannes linier for de til kode2 tilhørende   *
*                           kontogrupper, totallinie for kontogrupperne     *
*                           40 til 49, samt en linie uden total for konto-  *
*                           gruppe 73.                                      *
*    Ved slut på WPROTIME gøres der færdigt                                 *
*****************************************************************************
*
store '    ' to zkodproj
store '    ' to zkode2gr
store '    ' to zindex
store ' ' to zart
store '  ' to zkode2
store '  ' to zkode6
store '  ' to zkontogrp
store '      ' to zprojektnr
store '     ' to ztekst
store 0 to ztimprim
store 0 to ztimperi
store 0 to ztimulti
store 0 to ztimrest
store 0 to ztimplan
store 0 to zakprim
store 0 to zakperi
store 0 to zakulti
store 0 to zakrest
store 0 to zakplan
store 0 to zbelprim
store 0 to zbelperi
store 0 to zbelulti
store 0 to zbelrest
store 0 to zbelplan
store '    ' to zslut
store T to zlok
store T to ztim
store F to zbel
***  PERIODE REKORD TIL PRINT ***
use gout
append blank
replace kode2 with '00'
replace art with '0'
replace kode6 with '000'
replace projektnr with '      '
replace tekst with 'PERIODE'
replace prim with val(per)
replace peri with 0
replace ulti with 0
replace rest with 0
replace plan with 0
***
use WPROTIME index WKODPROJ
go top
*
DO WHILE ZLOK
*******************************************************************************
***            hovedløkke starter her                                       ***
***            time løkke starter her                                       ***
*******************************************************************************
   DO WHILE ZTIM
      ***  først dannes overskrift til en ny side ***
      store kode2 + kode6 + projektnr to zkodproj
      store '1' to zart
      store kode2 to zkode2
      ? ' danner nu print for projektgruppekode2 = '  , zkode2
      ***
      use ftekst index findex
      store zkode2 + '00' to zindex
      find &zindex
      if # = 0
         store '      ' to ztekst
      else
         store tekst to ztekst
      endif
      ***
      use gout
      append blank
      replace kode2 with zkode2
      replace art with '0'
      replace kode6 with '000'
      replace projektnr with '      '
      replace tekst with ztekst
      replace prim with 0
      replace peri with 0
      replace ulti with 0
      replace rest with 0
      replace plan with 0
      ***
      use WPROTIME index WKODPROJ
      find &zkodproj
      store T to zens
      *
      DO WHILE ZENS
         ***  nu detaillinier til timer, såfremt samme kode2 og ej eof  ***
         store kode2 + kode6 + projektnr to zkodproj
         store '1' to zart
         store kode2 to zkode2
         store kode6 to zkode6
         store primotim to ztimprim
         store periodetim to ztimperi
         store ultimotim to ztimulti
         store resttim to ztimrest
         store plantim to ztimplan
         store projektnr to zprojektnr
         store projektnr+' '+projnavn to ztekst
         ***
         use gout
         append blank
         replace kode2 with zkode2
         replace art with '1'
         replace kode6 with zkode6
         replace projektnr with zprojektnr
         replace tekst with ztekst
         replace prim with ztimprim
         replace peri with ztimperi
         replace ulti with ztimulti
         replace rest with ztimrest
         replace plan with ztimplan
         store zakprim + ztimprim to zakprim
         store zakperi + ztimperi to zakperi
         store zakulti + ztimulti to zakulti
         store zakrest + ztimrest to zakrest
         store zakplan + ztimplan to zakplan
         ***
         use WPROTIME index WKODPROJ
         find &zkodproj
         skip
         if EOF
            store 'slut' to zslut
            store F to zens
            loop
         endif
         if kode2 > zkode2
            store F to zens
            loop
         endif
         loop
      ENDDO ZENS
      ***  total linie for timer for en kode2 dannes ***
      ***
      use gout
      append blank
      replace kode2 with zkode2
      replace art with '1'
      replace kode6 with '999'
      replace projektnr with '      '
      replace tekst with 'TIMER IALT'
      replace prim with zakprim
      replace peri with zakperi
      replace ulti with zakulti
      replace rest with zakrest
      replace plan with zakplan
      store 0 to zakprim
      store 0 to zakperi
      store 0 to zakulti
      store 0 to zakrest
      store 0 to zakplan
      store '40' to zkontogrp
      store zkode2 + zkontogrp to zkode2gr
      store '2' to zart
      store F to ztim
      store T to zbel
   ENDDO ZTIM
*******************************************************************************
***            time løkke slutter her                                       ***
***            beløb løkke starter her                                      ***
*******************************************************************************
   DO WHILE ZBEL
      ***
      use cbelob index ckode2gr
      store zkode2 + zkontogrp to zkode2gr
      find &zkode2gr
      ***  beløbs linier for omk.grp dannes såfremt de findes i cbelob ***
      if # <> 0
         store kr to zbelprim
         store kr:periode to zbelperi
         store kr:ultimo to zbelulti
         store budrest to zbelrest
         store budper to zbelplan
         store '00' + zkontogrp to zindex
         ***
         use ftekst index findex
         find &zindex
         if # = 0
            store '      ' to ztekst
         else
            store tekst to ztekst
         endif
         ***
         use gout
         append blank
         replace kode2 with zkode2
         replace art with '2'
         replace kode6 with zkontogrp
         replace projektnr with '      '
         replace tekst with ztekst
         if zkontogrp <> '73'
            store zakprim + zbelprim to zakprim
            store zakperi + zbelperi to zakperi
            store zakulti + zbelulti to zakulti
            store zakrest + zbelrest to zakrest
            store zakplan + zbelplan to zakplan
         endif
         store (zbelprim + 500.00) / 1000 to zbelprim
         store (zbelperi + 500.00) / 1000 to zbelperi
         store (zbelulti + 500.00) / 1000 to zbelulti
         replace prim with int(zbelprim)
         replace peri with int(zbelperi)
         replace ulti with int(zbelulti)
         replace rest with zbelrest
         replace plan with zbelplan
      endif
      if zkontogrp = '40'
         store '41' to zkontogrp
         loop
      endif
      if zkontogrp = '41'
         store '42' to zkontogrp
         loop
      endif
      if zkontogrp = '42'
         store '43' to zkontogrp
         loop
      endif
      if zkontogrp = '43'
         store '44' to zkontogrp
         loop
      endif
      if zkontogrp = '44'
         store '45' to zkontogrp
         loop
      endif
      if zkontogrp = '45'
         store '46' to zkontogrp
         loop
      endif
      if zkontogrp = '46'
         store '47' to zkontogrp
         loop
      endif
      if zkontogrp = '47'
         store '48' to zkontogrp
         loop
      endif
      if zkontogrp = '48'
         store '73' to zkontogrp
         loop
      endif
      if zkontogrp = '73'
         ***  totallinie for beløb omk.grp 40 - 48 , 73 ej med ***
         ***
         use gout
         append blank
         replace kode2 with zkode2
         replace art with '2'
         replace kode6 with '50'
         replace projektnr with '      '
         replace tekst with 'KAPACITETSOMKOSTNINGER IALT'
         store (zakprim + 500.00) / 1000 to zakprim
         store (zakperi + 500.00) / 1000 to zakperi
         store (zakulti + 500.00) / 1000 to zakulti
         replace prim with int(zakprim)
         replace peri with int(zakperi)
         replace ulti with int(zakulti)
         replace rest with zakrest
         replace plan with zakplan
         store 0 to zakprim
         store 0 to zakperi
         store 0 to zakulti
         store 0 to zakrest
         store 0 to zakplan
      endif
***   og så retur til timer, næste kode2 eller eof ***
      store F to zbel
      if zslut = 'slut'
         store F to zlok
         loop
      endif
      ***
      use WPROTIME index WKODPROJ
      find &zkodproj
      if # <> 0
         skip
         if EOF
            store F to zlok
            store F to ztim
            loop
         endif
         store T to ztim
         loop
      endif
      if # = 0
         ? '****  fejl ved næste læs i ANEXT **** tast retur ' get ok
         wait
         store F to zlok
         loop
      endif
   ENDDO ZBEL
*******************************************************************************
***            beløb løkke slutter her                                      ***
***            hoved løkke slutter her                                      ***
*******************************************************************************
*
ENDDO ZLOK
*
set talk on
? ' '
? '11. KOPI TIL PERIODE PRINT REGISTER             , VENT !'
? ' '
***
use gout
copy to gout&per
? ' '
? '12. INDEKS PÅ PERIODE PRINT REGISTER            , VENT !'
? ' '
***
use gout&per
index on kode2 + art + kode6 + projektnr to gind&per
set talk off
? ' '
? '13. LISTE 1  ER OPDATERET OG KLAR TIL UDSKRIFT         !'
? '    VED UDSKRIFT SÅ ANVEND PERIODEN: ' , PER
? '    BRUG LISTE3 TIL EVT. KONTROL (inden næste opdat.)  !'
? ' '
*
release zkodproj, zkode2gr, zindex, zart, zkode2, zkode6, ztekst, ztimprim
release ztimperi, ztimulti, ztimrest, ztimplan, zbelprim, zbelperi, zbelulti
release zbelrest, zbelplan, zlok, zslut, zkontogrp, xprim, xulti, per, navn
release zakprim, zakperi, zakulti, zakrest, zakplan, zbel, ztim, zens
release zprojektnr
*
? ' '
? '14. SLUT MED OPDATERING  RC TIME OG OMKOSTNINGS OVERSIGT'
? ' '
? '    HUSK PÅ DISKETTEN I DISKETTE STATION B:,'
? '    TAGES UD NU !!!'
? ' '
? '                                              TAST RETUR'
? ' -------------------------------------------------------'
set console off
wait
set console on
set talk off
set escape off
store '  ' to ok
return
«eof»