次の例では、f1 のファイル記述は static としてマークされているため、アクセス可能です。f2 のファイル記述はマークされていないため、アクセスできません。
class-id a. file-control. select f1 assign "MyFile". select f2 assign "MyFile". file section. fd f1 static. 01 r1 pic x. fd f2. 01 r1 pic x. method-id main static. open output f1 *> This is OK open output f2 *> This produces the error end method. end class.