See below:
x "mknod pipe&sysjobid p"; filename cmd pipe "gzip < pipe&sysjobid > sashelp.DAT.gz &"; data _null_; infile cmd; stop; run; data _null_; file "pipe&sysjobid"; retain header; if missing(header) then do; put "NAME|SEX"; header = 1; end; set sashelp.class; put name +(-1) '|' sex; run; filename cmd clear; x "rm pipe&sysjobid";