The trick is to code the file layout using the I-specs. The following is a simple example:
FSrcFile IP F 92 Disk
D Char20 s 20a
I 1 6 2SrcSeq
I 7 12 0SecDat
I 13 92 SrcDta
C Eval Char20 = SrcDta
C Char20 Dsply
Here the file is defined as Input Primary so I haven’t had to worry about using READ, CHAIN, etc. Compile the program and then call it with:
OVRDBF FILE(SRCFILE) TOFILE(*LIBL/QCLSRC) OVRSCOPE(*JOB)
DLTOVR FILE(SRCFILE) OVRSCOPE(*JOB)
You should see the first CL source member in your library list displayed line by line.
All of the other file operations work the same way as they do for externally defined files, you just have to define the key attributes in the F-spec if you want to use random access.
All the best