Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

OpnQryF and Multiple Calls

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • T.Holt
    replied
    OpnQryF and Multiple Calls

    You're like everybody else, Scott -- trying to juggle too many "opportunities" at once. Don't be too hard on yourself.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    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

    Leave a comment:


  • Guest's Avatar
    Guest replied
    OpnQryF and Multiple Calls

    Yes. Thanks for turning my memory back on. It's reading a file in a CL that won't reposition after EOF. I must have had a brain cramp. Either that or too many irons in the fire lately... Thanks Ted. ==Scott==

    Leave a comment:


  • Guest's Avatar
    Guest replied
    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.

    Leave a comment:


  • T.Holt
    replied
    OpnQryF and Multiple Calls

    I'm not sure what you're asking, Scott. If you access the file sequentially, and hit EOF, you can reposition the file pointer. Maybe you're thinking of CL. When a CL program hits EOF, there's no way to reposition.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    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==

    Leave a comment:


  • T.Holt
    replied
    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.

    Leave a comment:


  • Guest's Avatar
    Guest started a topic OpnQryF and Multiple Calls

    OpnQryF and Multiple Calls

    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==
Working...
X