On Fri, 12 Dec 2008 12:28:22 -0600, Wilson, Roger <roger.wil...@milwaukee .gov> wrote:
>I am writing an exec that reads a file pulls certain lines out and write >this data to an output file. Simple. > > > >I am trying to use the CHARIN() and CHAROUT and I am failing miserably. For starters, since VM (and z/OS) are line-oriented, you will find that L INEIN and LINEOUT are much more efficient. Unfortunately, the performance of both of these is a lso quite poor. I have sped up an EXEC many tens of times replacing LINEIN/LINOUT with EXECIO. ( Look that up in CMS commands.) I got IBM to fix the LINEIN/LINEOUT performance via an APAR, h owever a subsequent APAR broke it again. By the time I noticed, I did not care, because IBM h ad included CMS Pipelines in VM, and it can be much faster if you do it right. (Do not use VAR or S TEM.) So as others have told you, the best way is CMS Pipelines, but there is q uite a learning curve. >Right now I queue the commands: > > > > parse arg where > > if where = '' then where = 'PERFSVM ' > > 'PIPE VMC ' where ' USER ', > >' | stem results. ', > >' | > FCX112 RESULTS A' > > QUEUE 'BOTTOM' > > QUEUE 'GET RUNDATE' > > QUEUE 'XEDIT FCX112 RESULTS A' > > QUEUE '/CICS' > > QUEUE 'PUT' > > QUEUE 'QQUIT' > > QUEUE 'GET' > > QUEUE 'XEDIT FCX112 RESULTS A' > > QUEUE '/DOSVSE' > > QUEUE 'PUT' > > QUEUE 'QQUIT' > > QUEUE 'GET' > > QUEUE 'XEDIT FCX112 RESULTS A' > > QUEUE '/COMP' > > QUEUE 'PUT' > > QUEUE 'QQUIT' > > QUEUE 'GET' > > QUEUE 'FILE' > > 'XEDIT SUMUSE LOG A (NOM' > >'WAKEUP +00:01:00' > >EXIT Shades of the 1970s. Back then, REXX did nto exist (at least for customer s) and we had to use EXEC (now called EXEC1). To do anything useful, we stacked lines for EDIT (predecessor of XEDIT) to process any data. It's any interesting exercise, but seldom necessary. Someone (U Maine?) i nvented EXECIO and that was a big improvement. The program stack exists to allow you to automate commands that prompt fo r input, such as FORMAT. I don't think it is valuable for much else. (Some people use it t o stack commands for FTP, but I prefer VMFTP which you can download.) For programming in REXX on VM,I recommend you either learn CMS Pipelines, or learn EXECIO. CMS Pipelines is far more powerful, but if you don't have time to learn i t, use EXECIO for REXX input and output. The only advantage of CHARIN/CHAROUT or LINEIN/LINEOUT are portability of REXX to other platforms. (z/OS does have EXECIO, though.) Once you start including CMS commands in your REXX EXECs, though, they are not portable to any other platform, anyway. Alan Ackerman Alan (dot) Ackerman (at) Bank of America (dot) com