PIPEd command in SCL/AF?

PIPEd command in SCL/AF?

Post by Russ Ramse » Wed, 23 May 2001 08:25:42



How do I get the output of a UNIX command to populate a list box in AF
or show in a text box?

I know how to write a dataset from a piped fileref.
This is from an example:
             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;

How do I directly read that into an SCL list or text box instead?

 
 
 

1. Saving AF SCL editor settings (Solaris OS, SAS V. 8.02)

I'm working with SAS/AF on a UNIX Solaris box using SAS ver. 8.02.  When I
go in to edit the SCL code for a frame, I'd like to save the editor
settings (such as autowrap, indent, and so on) so that I don't have to set
them the way I want them every time I start a SAS session.  Does anyone
know how to do this?  Thanks in advance.

James Donat
ATK Thiokol Propulsion

2. Software update service

3. Fw: Re: Newbie AF/SCL question - give focus to output window?

4. What's Best After Mkt. Controller??

5. Newbie AF/SCL question - give focus to output window?

6. GIS Magazines

7. SCL-SAS/AF

8. Minor CW 9 glitches

9. SAS AF/SCL list boxes and dot notation (2nd question)

10. SAS AF/SCL list boxes and dot notation

11. AF and SCL examples

12. SCL Link Command

13. VIM: Cannot put a pipe after a global command