zOs/REXX/WSHTUT37
$#@
$$ --- file and pipe ---
$= dsn = ~tst.wshtut(t36) ::f
$=n1=eins
$$ write to dsn
$<>
$>~tst.wshtut(t36) ::f
$$ zeile eins n1=$n1
$$ zeile zwei
$<>
$<~tst.wshtut(t36) ::f
$$ read from dsn
call pipeWriteAll
$<>
$$ copy dsn to buffer
$= b =. jBuf()
$<>
$<~tst.wshtut(t36) ::f
$>.b
$for i $$ fromDsn $i
$|
$$ vorher
cc = 0
$for i $@[
cc = cc + 1
$$ from pipe $-[cc$]: $i
$]
$$ nachher
$<>
$$ write buffer
call pipeWriteAll $b
$$ use single reads from buffer
$<>
$<.b
$do while in() $@[
q = m.in
if ${>abc} then
q = q '{<='left($abc, 20)
ii = m.j.in
if jRead(ii) then
q = q 'jRead='left(m.ii, 20)
$$- q
$]
$#out 20161127 12:33:47
--- file and pipe ---
write to dsn
read from dsn
zeile eins n1=eins
zeile zwei
copy dsn to buffer
write buffer
vorher
from pipe 1: fromDsn zeile eins n1=eins
from pipe 2: fromDsn zeile zwei
nachher
use single reads from buffer
vorher {<=from pipe 1: fromDsn jRead=from pipe 2: fromDsn
nachher
$#out 20161127 12:29:04