* read stdin, write stdout and stderr * update exit status * define constants needed by programs that use this service pgm * define condition stdio_srvpgm when compiling the service pgm * but not when compiling programs that use the service pgm D TAB c const(x'05') D CR c const(x'0d') D LF c const(x'25') D CRLF c const(x'0d25') D stdin pr 10i 0 D info 4096a varying D stdout pr D outfo 4096 const varying D stderr pr D outfo 4096 const varying D stdwrite pr D fd 10i 0 value D outfo 4096 const varying D exit pr D 3u 0 value /if defined(stdio_srvpgm) D fread pr 10i 0 extproc('read') D fd 10i 0 value D info * value D length 10u 0 value D fwrite pr 10i 0 extproc('write') D fd 10i 0 value D outfo * value D length 10u 0 value D cexit pr extproc('exit') D 3u 0 value /endif