Here's an example. I've read a tape, modified records as they have flowed through the pipeline and now I'm ready to write it back out to the same tape, including rewriting the standard label. But the TAPE stage would now append the stream to wherever the tape is currently positioned, so I need to rewind. Is it as simple as piping a literal TAPE REW, fanning out, taking one, cmsing and then connecting the fanout back to a tape stage to write the label, repeating the process for the FSF 1 before the data? Does the pipeline synchronously wait for the cms command to complete, and if not, how do you synchronize? Not sure how the QSAM stage works, but I would still have to FILEDEF and LABELDEF based on information in my stream, assuming QSAM understands the state of the tape drive and backspaces or rewinds to get to the proper tape file, making it somewhat better than issuing cms commands.
-----Original Message----- From: CMSTSO Pipelines Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Rob van der Heij Sent: Friday, June 06, 2008 1:05 PM To: [email protected] Subject: Re: Learning to plumb On Fri, Jun 6, 2008 at 6:17 PM, Quay, Jonathan (IHG) <[EMAIL PROTECTED]> wrote: > I'm trying to move beyond apprentice plumbing and develop some > journeyman skills. I've mastered the built in stages, mutistreaming and > heavy spec manipulation. But I find myself ending a pipe, saving the > stream to disk, and dropping back into rexx to do things. What is the > proper way, based on data flowing through a pipe, to manipulate the > environment outside the pipe, using things such as CP and CMS commands, > while keeping the records flowing? For example, TAPE manipulation, > LINKing disks, setting up the device you're going to drive, etc. I've > looked through the Author's Edition, but can't really figure it out. Is > there some tutorial material somewhere that would help? I'm not aware of many proper examples on that. Probably because it makes it less easy to read and that kind of stuff is often very specific and easy to adapt outside your pipeline. That also makes it easier to re-use your plumbing when there's no side effects happening in it. But there are the CP and COMMAND stages, so you can feed commands there to have them run while you are piping the data. I've done tricks like fanout into three streams and use 'unique first' and 'unique last' to generate ACCESS and RELEASE commands, for example. If you write a REXX stage it is often very well possible to issue commands from there while you are processing portions of the data. I'd say it is very rare that temporary files are an attractive way to build your plumbing (though it does help if you experiment from the command line). If you have an example of what you want to do, there's probably a few plumbers out here willing to come up with an approach. Rob -- Rob van der Heij Velocity Software GmbH http://velocitysoftware.com/
