You can do this. I do it all the time. After the first CALL, issue a POSDBF to move the record pointer back to the start, then call the next program, etc. POSDBF OPNID(MYFILE) POSITION(*START) ==Scott==
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
OpnQryF and Multiple Calls
Collapse
X
-
OpnQryF and Multiple Calls
POSDBF is the best technique, but you shouldn't need it in this case, since you're reading the file randomly. If all the programs that use the file are only using CHAIN to access it, you don't have to reset the file pointer. Be sure to specify SEQONLY(*NO) in the OPNQRYF.
-
OpnQryF and Multiple Calls
Good point, Ted. Also, I think I recall some problem of when you read the OPNQRYF file all the way to the end until you get an EOF condition, you can't POSDBF to *Start after that? (This doesn't apply to chains, just doing a READ to EOF). ==Scott==
Comment
-
OpnQryF and Multiple Calls
Ted, Thanks for this, I was just getting ready to ask why this would be necessary on a chained file. Scott, Thanks for your note. It's all working. Bill > POSDBF is the best technique, but you shouldn't need it in this case, since you're reading the file randomly. If all the programs that use the file are only using CHAIN to access it, you don't have to reset the file pointer. Be sure to specify SEQONLY(*NO) in the OPNQRYF.
Comment
-
OpnQryF and Multiple Calls
I have a situation where I'd like an OpnQryF filter to exist across programs that are called sequentially. I'm not sure if I can do what I need to do. If it makes any difference the filtered file will be chained to. Here's what I'd like to do: OvrDbf OpnQryF Call Call Call CloF DltOvr Can I do that, or do I need to do this: OvrDbf OpnQryF Call Clof OpnQryF etc.... Bill
Comment
Comment