/* REXX */ /**********************************************************************/ /* $MAC(FOMFBRED) COMP(SCPX1) PROD(FOM): */ /* EXEC: FOMFBRED */ /****PROPRIETARY_STATEMENT********************************************/ /* LICENSED MATERIALS - PROPERTY OF IBM */ /* 5655-068 (C) COPYRIGHT IBM CORP. 1995 */ /* */ /* STATUS= HOT1130 */ /****END_OF_PROPRIETARY_STATEMENT*************************************/ /* FUNCTION: Invoke OEDIT and OBROWSE passing full pathnames */ /* SYNTAX: oedit [filename...] or obrowse [filename...] */ /* RESTRICTIONS: Pathnames containing the following are ignored: '() */ /* RETURN CODES: 0 oedit or obrowse called for each file */ /* 1 a pathname contained an unsupported character */ /* 2 3270 passthrough not available */ /* CHANGE ACTIVITY: (recent only) */ /* $P1=PPX0107 HOT1130, 940414, PDND: oedit/obrowse shell commands */ /**********************************************************************/ address syscall 'pt3270 1 2' if retval=-1 then do mtext="Unable to set 3270 passthrough mode" "catopen fomfmsgc.cat" if retval<>-1 then "catgets" retval "1 41 mtext" say mtext return 2 end parse value reverse(__argv.1) with cname '/' cname=reverse(cname) 'getcwd cwd' retcd=0 recl='' if cname='oeditf' then do parse arg ln nm if datatype(ln,'W') then do recl=ln nm=strip(nm) end else do recl=80 parse arg nm end call bred strip(nm) end else if __argv.0<2 then call bred else do i=2 to __argv.0 call bred __argv.i end 'pt3270 1 3' return retcd bred: parse arg path if path<>'' & substr(path,1,1)<>'/' then path=cwd'/'path cmd=cname recl path if verify(cmd,"()'","M")<>0 then do retcd=1 return end buf='ff51000000010001'x || d2c(length(cmd),4) || cmd "write 1 buf" "read 1 ibuf 1000" return 0