From: Dennis Ball To: All
I was hoping someone else encountered this problem. Although we have used OPNQRYF quite a bit, we have a recurring problem. After running the OPNQRYF command, we run a program and it runs perfectly. The second program can't get the OPNQRYF-it seems that the file closes. We have tried several changes to get the file to stay open, i.e., *PERM, but that hasn't worked. We don't want to run the OPNQRYF twice and we don't want a logical file. Anybody have the answer?
From: Ted Holt To: Dennis Ball
There are two ways to reuse an OPNQRYF command. The easy way is to use a POSDBF command between the two calls.
OPNQRYF ... CALL PGMA POSDBF OPNID(XYZ) POSITION(*START) CALL PGMB
The other way is to have the second program reposition the file pointer, using a command such as RPG's SETLL or COBOL's START verb.
LATEST COMMENTS
MC Press Online