次の例では、リスト集合から要素を読み取ります。
       declare val as string
       read stringList into val key 0
                次の例に、辞書集合の無効なキーを読み取るときの例外処理と例外捕捉を示します。
       display "reading an invalid key message : "
       read stringDictionary into val key "RUBBISH"
       invalid key
           display "Caught invalid key"
       not invalid key
           display "Shouldn't see this"
       end-read 
                集合のサンプルも参照してください。このサンプルは、[スタート > すべてのプログラム > Micro Focus Enterprise Developer > Samples] の COBOL for JVM の下にあります。