/* 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 = "Version 0.80 vom 2.12.2002"
Autor = "JD"
Redakteur01 = "JD Drucker U0021515 voreingestellt" " "
/*-----------------------*/ /* Parameter untersuchen */ /*-----------------------*/ arg parm1 address isredit 'ISREDIT MACRO (parm1) NOPROCESS' if parm1 = ""then arg parm1
parm1 = translate(parm1) if parm1 = '?'thendo call help exit end if parm1 <> '',
& index(parm1, '@') = 0,
& substr(parm1,1,1) <> "'"thendo call help exit end
/*---------------------------------------------------------*/ /* Ersatz-Datei mit DSN z.B.= 'ANWJ1.PROUT' (User = anwj1) */ /*---------------------------------------------------------*/
user = userid()
proutdat = '''' !! user !! '.PROUT'''
print_prout = 0
/*----------------------------------*/ /* Ermitteln von Dateiinformationen */ /*----------------------------------*/
editor = 1 ifsubstr(parm1, 1, 1) = "'"thendo /*-----------------------------------------------*/ /* Ermitteln von DSN bei Aufruf aus Command Line */ /*-----------------------------------------------*/
editor = 0
dsn_e = 0 do i = length(parm1) by -1to2 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'
rc_mem = rc /*-----------------------------------------------*/ /* Ermitteln von DSN bei Aufruf aus Editor */ /*-----------------------------------------------*/ if (rc_dsn /= 0 & rc_mem /= 0) ! (dsn = '' & mem = '') then /*---------------------------------------*/ /* Weder DSN noch Membername ermittelbar */ /*---------------------------------------*/
print_prout = 1 elsedo /*---------------------------------------*/ /* DSN oder Membername bekannt */ /*---------------------------------------*/
print_prout = 0
first = 1
last = 9999
full_dsn = "'" !! dsn !! "'"
rc_list = listdsi(full_dsn) if rc_list /= 0thendo if rc_list = 16then
print_prout = 1 elsedo
zedsmsg = 'Macro-Mail-Error **'
zedlmsg = 'RC from LISTDSI: ',
rc_list ', REASON: ' SYSREASON say"zedmsg="zedlmsg 'setmsg msg(isrz000)' exit(12) end end /* Auswerten der Variablen nach erfolgreichem LISTDSI */ if sysdsorg /= 'PS'then
full_dsn = "'" !! dsn !! "(" !! mem !!")'" ifindex(dsn,'IKVTEMP') > 0thendo 'isredit save' end end end
/*----------------------------------------------------*/ /* Ermitteln der Satzlänge und Setzen der Seitenlänge */ /*----------------------------------------------------*/
rc_list = listdsi(full_dsn) if rc_list /= 0thendo say"listdsi.rc="rc_list" syslrecl="syslrecl if editor = 1thendo 'isredit (lq) = line'1
lrecl = length(lq) end else
lrecl = 133 end else
lrecl = syslrecl select when lrecl > 87thendo
dfcb = "Q321"
pagewidth = 133 end when lrecl <= 87thendo
dfcb = "H326"
pagewidth = 88 end otherwise nop end select when parm1 = 'quer' ! parm1 = 'QUER'thendo
dfcb = "Q321"
pagewidth = 133 end when parm1 = 'hoch' ! parm1 = 'HOCH'thendo
dfcb = "H326"
pagewidth = 88 end otherwise nop end if lrecl >= pagewidth thendo
print_prout = 1
first = 1
last = 9999 end
/*----------------------------------------------------*/ /* Ermitteln, welcher Bereich gedruckt werden soll. */ /*----------------------------------------------------*/ if editor = 1thendo address isredit 'isredit process range #' select when rc = 0then print_prout = 1 when rc = 4thensay'RC from Edit-Cmd PROCESS RANGE = 'rc when rc = 8thensay'RC from Edit-Cmd PROCESS RANGE = 'rc when rc = 12thensay'RC from Edit-Cmd PROCESS RANGE = 'rc otherwisesay'Error on Edit-Cmd PROCESS RANGE, RC = 'rc exit (12) end
'isredit (cmd) = range_cmd' select when rc = 0thendo say'==> the selected lines will be mailed', ' to account 'userem()'.' end when rc = 4then do say'==> the whole member will be emailed', ' to account 'userem()'.' end otherwisesay'Error on Edit-Cmd RANGE_CMD, RC = 'rc exit (12) end say'Type <ENTER> to proceed or ''N'' to stop' pull answer if answer = ''thennop elseexit(4) 'isredit (first) = linenum .zfrange' 'isredit (last) = linenum .zlrange' end
address tso if print_prout = 1thendo /*---------------------------------------------------*/ /* 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 */ if editor = 1thendo do lnr = first to last by1 'isredit (lq) = line' lnr if lrecl <= pagewidth+10thendo
record=' 'substr(lq,1,pagewidth-1) /* put current linenr to the stack */ queue record do j = 1tolength(lq) ifsubstr(lq,j,1) <= "4A"X & substr(lq,j,1)<>" "then
lr=substr(lq,1,j-1)"."substr(lq,j+1,pagewidth-j) end end elsedo /* Zeile länger als pagewidth */ /* also aufbrechen */ queue' +++'lnr':' do i = 0while i < lrecl
lr = substr(lq,i+1, pagewidth-5) if i >= pagewidth-5thendo ifsubstr(lq,1,10)='---------+'then ifsubstr(lq,11,10)='---------+'then ifsubstr(lq,21,10)='---------+'then
lq = substr(lq,1,pagewidth-5) end do j = 1tolength(lr) ifsubstr(lr,j,1) <= "4A"X & substr(lr,j,1)<>" "then
lr=substr(lr,1,j-1)"."substr(lr,j+1,pagewidth-5-j) end
record=' 'lr ifsubstr(lq,i+1,lrecl) /= ' 'then queue record
i =i+pagewidth-5-1 end end end/* do lnr = 1 to last */ end elsedo/* editor /= 1 */ 'ALLOC F(IN) DA('FULL_DSN') SHR' 'EXECIO * DISKR IN (FINIS'/* READ FILE TO STACK */ 'FREE F(IN)' end /* delete previous dataset */
rc_p=msg('off') 'DEL ('proutdat')' if rc <> 0thensay'rc1='rc /* allocate new dataset */
pw=pagewidth-1 'ALLOC DA('proutdat') NEW CATALOG SPACE(30,10)', 'BLKSIZE('pw*10') LRECL('pw')'
rc_p=msg('on') if rc <> 0thensay'rc2='rc /* write the current stack to the file */ queue'' 'ALLOC F(OUT) DA('proutdat') OLD' 'EXECIO * DISKW OUT (FINIS'/* write stack to the file */ 'FREE F(OUT)' 'DELSTACK'/* delete stack */ call email proutdat
rc_pr = rc
dsn = proutdat
full_dsn = proutdat end elsedo /*-------------------------------------------------------*/ /* DSN of currently edited Source has been determined; */ /* print the marked lines via TSO-Print-Command directly */ /*-------------------------------------------------------*/ call email full_dsn
rc_pr = rc end
if mem /= ''then say'EMail of Member 'mem' in Dataset 'dsn else say'EMail of Dataset 'dsn say'from line 'first' to 'last' ended with rc='rc_pr exit(rc_pr)
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 <ENTER>. ' 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' example: #120 - 120 lines or a block marked by the ## ...## ' say' command). Type ''mail'' on the COMMAND line to email the ' 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
Messung V0.5 in Prozent
[Diese Firma untersucht Systeme, entwickelt Software und berät
Organisationen zu Themen der Informationstechnolgie. Dabei wird Wert auf anerkannte Normen und Standards gelegt.
Die Qualität eigener und fremder Produkte ist Leitlinie und Ziel zugleich.
Unter bestimmten Bedingungen finden Sie hier weiterführende Anregungen.0.5Die F&E-Firma in NorddeutschlandProjekt 2026-06-04]