02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

52 Pipe Libraries (Experimental) Chapter 2<br />

Sample JCL<br />

The following code example illustrates how to write a <strong>SAS</strong> data library to a pipe:<br />

//jobname JOB<br />

// EXEC <strong>SAS</strong><br />

//*--------------------------------------------------<br />

//* This job writes a <strong>SAS</strong> data set to a pipe.<br />

//*--------------------------------------------------<br />

//PIPESND DD DSN=TEST.<strong>SAS</strong>.BATCHPIPES,<br />

// LRECL=6144,RECFM=F,DSORG=PS,<br />

// SUBSYS=(BP01,CL<strong>OS</strong>ESYNC,ERC=DUMMY),<br />

// LABEL=(,,,OUT)<br />

//*<br />

//SYSIN DD *<br />

data pipesnd.member1;<br />

...<br />

output;<br />

run;<br />

/*<br />

//<br />

The following code example illustrates how to read a <strong>SAS</strong> data library from a pipe:<br />

//jobname JOB<br />

// EXEC <strong>SAS</strong><br />

//*-------------------------------------------<br />

//* This job reads a <strong>SAS</strong> data set from a pipe.<br />

//*-------------------------------------------<br />

//PIPERCV DD DSN=TEST.<strong>SAS</strong>.BATCHPIPES,<br />

// LRECL=6144,RECFM=F,DSORG=PS,<br />

// SUBSYS=(BP01,CL<strong>OS</strong>ESYNC,EOFREQUIRED=NO),<br />

// LABEL=(,,,IN)<br />

//*<br />

//SYSIN DD *<br />

data ...;<br />

set pipercv.member1;<br />

...<br />

run;<br />

/*<br />

//<br />

The following code examples demonstrate how to use multiple <strong>SAS</strong> data step or<br />

procedure pairs in a single pair of jobs. Note that only one member can be written to a<br />

pipe library in a <strong>SAS</strong> step, and that there is a one-to-one correspondence of steps and<br />

procedures between receiving and sending pipe jobs.<br />

Sending job:<br />

DATA PIPEOUT.MEMBER1; X=1; RUN;<br />

DATA PIPEOUT.MEMBER2; Y=2; RUN;<br />

Receiving job:<br />

/* receives MEMBER1 from sending job */<br />

DATA X; SET PIPEIN.MEMBER1; RUN;<br />

/* will copy MEMBER2 to WORK library: */<br />

PROC COPY IN=PIPEIN OUT=WORK; RUN;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!