Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tronsbox!akcs.erk From: akcs.erk@tronsbox.xei.com Newsgroups: comp.lang.rexx Subject: Re: sharing external functions between cms rexx programs and xedit rex Message-ID: <2703cb31-45.2comp.lang.rexx-1@tronsbox.xei.com> Date: 29 Sep 90 02:01:37 GMT Lines: 51 Author: [Erk] References: <1990Sep21.154558.25058@wrkgrp.uucp> <90268.102821jmsommer@miamiu.acs.muohio.edu> Lines: 47 Another suggestion: Use one REXX exec that handles ANY console I/O. Example follows: ------------------------------------------------------------------------ /* SAMPLE EXEC A */ do i = 1 to 20 call output('Printing #'i) end exit ------------------------------------------------------------------------ /* OUTPUT EXEC A */ parse arg output_string address command 'SUBCOM XEDIT' ; in_xedit =(rc=0) address command 'SUBCOM ISPEXEC'; in_ispf =(rc=0) in_subset=(CMSflag('SUBSET')) select when in_xedit & ^in_subset then do address XEDIT 'MSG' output_string end when in_ispf then do LMSG=output_string address ISPEXEC 'VPUT LMSG' end otherwise do say output_string end end exit ------------------------------------------------------------------------ There are obviously limitless numbers of formatting options that could be added. In the version that I use, I send carriage control and interpret each of the carriage control characters. (A '1' clears the screen, '0' skips a line, '-' skips 2 lines... you get the idea) +----------------------------------------+------------------------------+ ! Eric Glenn - akcs.erk@tronsbox.UUCP ! VM/CMS Unix PC DOS ! ! uunet!tronsbox!akcs.erk ! Ramis Focus Rexx ISPF ! ! Be alert! The world needs more lerts. ! PL/I Cobol C BASIC ! +----------------------------------------+--------/\YUK/\---------------+