pipe: /* create the dataset work.kshusers with the uid variable */ dsid=open('kshusers', 'n'); rc=newvar(dsid, 'uid', 'c', 20); rc=close(dsid); /* open the dataset in update mode so we can use the */ /* APPEND function */ dsid=open('kshusers', 'u'); call set(dsid); /* assign our UNIX command to a fileref */ command='grep "ksh$" /etc/passwd | sed "s/:.*$//"'; rc=filename('comfref', command, 'PIPE'); fid=fopen('comfref', 'S'); /* read the output from the pipe */ do while(fread(fid) ^= -1); rc=fget(fid,uid); rc=append(dsid); end; /* clean up */ rc=close(dsid); rc=fclose(fid); rc=filename('comfref', ' '); return;