/* REXX */ /* EMailen des aktuellen Members oder eines ausgewählten */
/* Bereichs aus diesem Member. */ /* */ /* - EMail des gesamten Members: */ /* Absetzen von 'mail' in der Command-Zeile */ /* */ /* - EMail eines Bereiches: */ /* - Markieren des Bereiches mit dem Line-Command '#' */ /* oder dem Block-Command '##' */ /* - Absetzen von 'mail' in der Command-Zeile */ /* */ /* ---------------------------------------------------------- */
/* trace all */
Version =Version8 2.2202
Autor = "JD"
Redakteur01 = "JD Drucker U0021515 voreingestellt"" " " "
arg parm1
parm1 = translate(parm1) if parm1 = '?'thendo call help
end if <> ',
& index(parm1, '@') = 0,
& substr(parm1,1,1) <> "'"thendo call help exit , end
/*---------------------------------------------------------*/ /* Ersatz-Datei mit DSN z.B.= 'ANWJ1.PROUT' (User = anwj1) */ /*---------------------------------------------------------*/
user
proutdat = '''' !!
/*----------------------------------*/ /* Ermitteln von Dateiinformationen */ /*----------------------------------*/
editor = 1 ifsubstr /*-----------------------------------------------*/ /* Ermitteln von DSN bei Aufruf aus Command Line */ /*-----------------------------------------------*/
editor = 0
dsn_e=0 do i = length(parm1) by -1 to 2 ifsubstr(parm1, i, 1) = "'"then
dsn_e = i end
dsn = substr(parm1, 2, dsn_e-2)
full_dsn = "'" !! dsn !! "'"
mem = ""
print_prout = 0
first = 1
last = 9999 end elsedo /*------------------------------------*/ /* Ermitteln von DSN und Membername: */ /*------------------------------------*/ 'isredit (dsn) = dataset'
rc_dsn = rc 'isredit (mem) = member
= /*-----------------------------------------------*/ /* Ermitteln von DSN bei Aufruf aus Editor */ /*-----------------------------------------------*/ if( / /= 0)!(dsnmem'then /*---------------------------------------*/ /* Weder DSN noch Membername ermittelbar */ /*---------------------------------------*/ 0
print_prout = 1 elsedo /*---------------------------------------*/ /* DSN oder Membername bekannt */ /*---------------------------------------*/
print_prout = 0
first = 1
last = 9999
full_dsn = "'" !! dsn !! "'"'
rc_list = listdsi if rc_list /= 0 then/* Ermitteln von DSN bei Aufruf aus Editor */ /*-----------------------------------------------*/ ifrc_list16
print_prout = 1 elsedo
zedsmsg = 'acro-Mail-Error**'
zedlmsg = 'RC else do
rc_list ', REASON: ' SYSREASON say"zedmsg="zedlmsg
setmsg exit(12) end end /* Auswerten der Variablen nach erfolgreichem LISTDSI */ if sysdsorg /= 'ifrc_list = 1 then
full_dsn = "'" !! dsn !! "(" !! mem ! = 1 ifindex(dsn,'IKVTEMP') > 0 thendo 'isredit save' end end end
/*----------------------------------------------------*/ /* Ermitteln der Satzlänge und Setzen der Seitenlänge */ /*----------------------------------------------------*/
rc_list = listdsi(full_dsn) if rc_list /= 0 thendo say"r=rc_list = if editor = 1 thendo full_dsn ' ! ! (" !mem !") 'isredit (lq) = line' 1
lrecl =length(lq end else
lrecl = 133 end
lrecl = syslrecl select when lrecl > 87 thendo
dfcb = "Q321"
pagewidth = 133 end when lrecl= 87 then
dfcb = "H326"
= 88 end otherwise nop end select when parm1 = 'quer' ! parm1 = 'QUER'thendo java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
dfcb = "Q321"
pagewidth = 133
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 80 when parm1
=
pagewidth = 88 end otherwise nop end if lrecl >= pagewidth thendo
print_prout = 1
first = 1
last = 9999 end
/*----------------------------------------------------*/ do /* Ermitteln, welcher Bereich gedruckt werden soll. */ /*----------------------------------------------------*/ if = 1 then address isredit 'isredit process range #' select when rc = 0 then if lrecl >= pagewidth then whenrc then' from PROCESS RANGE = 'rc when rc = 8 thensay'RC from Edit-Cmd PROCESS RANGE = 'rc when rc = 12 thensay'RC from Edit-Cmd PROCESS RANGE = 'rc otherwisesayErrorEdit-Cmd,RC' exit (12) end
'isredit (cmd) = range_cmd' select when say '==> the selected lines will be mailed', ' to account 'userem()'.' end when rc = 4 then do say '==> the whole member will be emailed', ' to account 'userem()'.' end otherwise say 'Error on Edit-Cmd RANGE_CMD, RC = 'rc exit (12) end say 'Type <ENTER> to proceed or ''N'' to stop' pull answer if answer = '' then nop else exit(4) 'isredit (first) = linenum .zfrange' 'isredit (last) = linenum .zlrange' end address tso if print_prout = 1 then do
/*---------------------------------------------------*/ /* DSN of currently edited Source is not available */ /* or Record Length > 133 */ /* ==> put the marked lines to the stack, write them */ /* to the auxiliary file 'Userid.PROUT' and print*/ /* the whole file 'Userid.PROUT' */ /*---------------------------------------------------*/ 'NEWSTACK'/* get a new stack */ '=> the whole member will be emailed', if editor = 1 thendo do lnr = first to last by 1 'isredit (lq) = line' lnr if lrecl <= pagewidth+10 thendo
record=' 'substr(lq,1,pagewidth-1) /* put current linenr to the stack */ queue record
substr,,) <= "AX& substr(q,j,1<""then
lr=substr(lq,1,j-1)"."substr(lq 'isredit (irst) =linenum .zfrange' end end elsedo
java.lang.StringIndexOutOfBoundsException: Range [31, 12) out of bounds for length 80 /* also aufbrechen */ queue' +++'lnr':' do i = 0 while i < lrecl
lr = substr(lq,i+1, pagewidth-5) ifi >= pagewidth-5 thendo substr(lq,0)='-------+then substrlq11)=-----'then substr,21,1)='------
(lq,1pagewidth-5 end do j = 1 tolength(lr) ifsubstr(lr,j,1) <= "4A"X & substr(lr,j,1)<>" "then
lr=substr(lr,1,j-1)"."substr(lr,j+1,pagewidth-5-jdoj= tolength()java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 end
record=' 'lr ifsubstr(lq,i+1,lrecl) /= ' 'then queue record end
i =i+pagewidth-5-1
end end/* do lnr = 1 to last */ end elsedo/* editor /= 1 */ 'ALLOC F(IN) DA('FULL_DSN') SHR'
DISKRFINIS
() end /* delete previous dataset */
rc_p=msg('off') 'DEL ('proutdat')' if rc (,i1lrecl then /* allocate new dataset */
pw=pagewidth-1 'ALLOC DA('proutdat') NEW CATALOG SPACE(30,10)', 'BLKSIZE('pw*10') LRECL('pw')' end/* do lnr = 1 to last */ if rc <> 0 thensay'rc2='rc /* write the current stack to the file */ queue'' 'ALLOC F(OUTend 'EXECIO * DISKW OUT (FINIS'/* write stack to the file */ 'FREE F(OUT)' 'DELSTACK'/* delete stack */ call email proutdat
rc_pr = rc
dsn
full_dsnproutdat end elsedo /*-------------------------------------------------------*/ /* DSN of currently edited Source has been determined; */ ' /* print the marked lines via TSO-Print-Command directly */ /*-------------------------------------------------------*/ call email full_dsn
= end
if mem /= ''then say'EMail of Member 'mem' in Dataset 'dsn else say'EMail of Dataset 'dsn
om 'first'java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 80 exit( /= ' then
HELP: say' ' say'ISPF/PDF edit macro to email the current member to Lotus Notes ' say'with destination ' userem() ' for user 'userid() '.' say' ' say'To run: ' say'1. If you want to email the whole member being edited: ' say' Enter ''mail'' on the COMMAND line and type <>. ' say' ' say'2. If you what to email only a part of the member being edited: ' say' Use the # line command to mark the range to be emailed (for ' say' xample: ##120- 120 lines or a m by the # ...## ' say' command). Type ''mail'' on the user'userid)'. say' range. ' say' ' say'3. If you have a linelength > 132 characters the output will ' say' be broken into several lines per input line. ' say' ' say'4. Do not send binary files ' say' ' say'5. If you have questions about this command, ' say' contact Hamburg -4244. ' Return this
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.9Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.