UD type

Folders are also treated like data files (type UD); flat files in them - like records. This allows, for example, use JED to edit source code. Data can be copied transparently between hashed files and folders. Some examples:

Create the folder:

     CREATE-FILE DATA TEST.BP TYPE=UD
      
     [ 417 ] File TEST.BP created , type = UD

Create a program:

     JED TEST.BP PROG1
      
     0001 CRT 2*2

Save file. Compile and run it:

     BASIC TEST.BP PROG1
      
     PROG1
     BASIC_3.c
     Source file PROG1 compiled successfully

     CATALOG TEST.BP PROG1
      
     PROG1
     Object PROG1 cataloged successfully

     PROG1
      
     4

Copy data:

     COPY FROM F.SAMPLE TO TEST.BP REC1
      
     1 records copied

Edit file REC1 in TEST.BP folder with any text editor so it now looks like:

     Field one - updated
     Field two
     Field three

Copy it back to hashed file:

     COPY FROM TEST.BP TO F.SAMPLE REC1 OVERWRITING
      
     1 records copied

See the result:

     LIST F.SAMPLE
      
     F.SAMPLE......     ID..................   FIELD 1 HEADER
      
     REC1               REC1                   Field one - up
                                               dated

Last update: Sat, 16 Jul 2022 15:34