Open a work file for append in BS2000

Hi,

i want to open a work file for append.
This is my code:


#DSNAME := 'SYS.ACCOUNT.2011-03-*'
FIND CATALOG-VIEW WITH DSNAME = #DSNAME AND NODE = #NODE
  FIND ACFILE-VIEW WITH DATEINAME = ACDATEINAME
    IF NO RECORDS FOUND
      STORE RECORD IN FILE ACFILE-VIEW
      DEFINE WORK FILE 1 DSNAME
      DEFINE WORK FILE 5 'ACCOUTTDEV' ATTRIBUTES 'EXTEND,KEEP'
      FETCH  RETURN 'ACHAUPT'
      CLOSE WORK FILE 1
      CLOSE WORK FILE 5
    END-NOREC
  END-FIND
END-FIND

In the program ACHAUPT the program writes data in the work file 5.


VALUE 'TDEV' 
   #ANZAHLTDEV := #ANZAHLTDEV + 1 
   WRITE WORK FILE 5 VARIABLE #SATZKENNUNG #ZEITSTEMPEL 
                           #GKZTHEX #GGINFOHEX #ZUSATZ #INFODYNAMIC 
    FETCH RETURN 'ACTDEVP' 

I want to process all files from March 2011, which works so far.
I can see this in the database-file and in the outputfile.
But in the work file ‘ACOUTTDEV’ I can only find data from 31.03.2011.

Thanks for your help.

Jörg

The Natural 427 manual states

So, ATTRIBUTES ‘APPEND, KEEP’ won’t work.

Try “DISP=(MOD,” for CMWKF05 in your JCL (or the equivalent for BS2000).

Thank you very much. It’s OK.