TechTalk: Recycling OPNQRYF

General
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

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.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$