Skip to main content

Is there anyway to 'Read" a copy file from Working Storage each time the program is ran? Here is a example. For 20 or so programs only certain users can run different functions from the program.

Currently I have to compile the program each time I change the table.

01 FG1700-TABLE PIC X(03).
    88 VALID-ALL VALUE
                          "SGK" "SGT"
                          "DMR" "DMP"
                          "DMS" "DMF"
                          "DMD" "DM3".
    88 VALID-FG0400 VALUE
                         "SGK" "SGT"
                         "DMZ" "DMS"
                         "DMF" "DMD"
                         "DM3" "DM9".
    88 VALID-DISPLAY VALUE
                         "DMZ" "DM5"
                         "DM9".
    88 VALID-FG1750 VALUE
                        "DM5".

Is there anyway to 'Read" a copy file from Working Storage each time the program is ran? Here is a example. For 20 or so programs only certain users can run different functions from the program.

Currently I have to compile the program each time I change the table.

01 FG1700-TABLE PIC X(03).
    88 VALID-ALL VALUE
                          "SGK" "SGT"
                          "DMR" "DMP"
                          "DMS" "DMF"
                          "DMD" "DM3".
    88 VALID-FG0400 VALUE
                         "SGK" "SGT"
                         "DMZ" "DMS"
                         "DMF" "DMD"
                         "DM3" "DM9".
    88 VALID-DISPLAY VALUE
                         "DMZ" "DM5"
                         "DM9".
    88 VALID-FG1750 VALUE
                        "DM5".

The most common way to handle user privileges is to use an indexed file, the record key value of which is the user ID.  The fields in the record would be the various privileges.  Of course, this would need a maintenance program to create/edit privileges.

When the user logs in, process all the privileges into a record with the EXTERNAL clause on its definition.  This makes the user's privileges accessible by any program in the run unit without having to pass via parameters.


Is there anyway to 'Read" a copy file from Working Storage each time the program is ran? Here is a example. For 20 or so programs only certain users can run different functions from the program.

Currently I have to compile the program each time I change the table.

01 FG1700-TABLE PIC X(03).
    88 VALID-ALL VALUE
                          "SGK" "SGT"
                          "DMR" "DMP"
                          "DMS" "DMF"
                          "DMD" "DM3".
    88 VALID-FG0400 VALUE
                         "SGK" "SGT"
                         "DMZ" "DMS"
                         "DMF" "DMD"
                         "DM3" "DM9".
    88 VALID-DISPLAY VALUE
                         "DMZ" "DM5"
                         "DM9".
    88 VALID-FG1750 VALUE
                        "DM5".

That's what I thought. Thanks