I have done a sas code using PROC SQL and I am wondering how can I do to throw my proc sql table into a flat file, see my code below:
000008 //GO EXEC SAS,WORK='3000,900'
000009 //SASLIST DD SYSOUT=*
000010 //ENTRE1 DD DISP=SHR,DSN=PE5A.MFFFF001.S031020G(0)
000012 //SORTIE DD DSN=UE5A.MFFFF001.COUNT.IV,
000013 // UNIT=SYSALLDA,DISP=(,CATLG,DELETE),
000014 // DCB=(DSORG=PS,RECFM=FB,LRECL=100,BLKSIZE=0),
000015 // SPACE=(CYL,(1,10),RLSE)
000016 //SSAVE DD *
000017 //SYSIN DD *
000018 DATA IV;
000019 INFILE ENTRE1;
000020 INPUT @056 SDU $CHAR2.
000021 @085 SYS_EMET $CHAR2.
000022 @149 ANNE_RECEP 4.
000023 @153 MOIS_RECEP 2.
000024 @279 IND_ASSOC $CHAR1.;
000025 RUN;
000026
000027 PROC SQL;
000028 CREATE TABLE IV_PREP AS
000029 SELECT
000030 SDU,
000031 SYS_EMET,
000032 CASE
000033 WHEN MOIS_RECEP <= 3
000034 THEN ANNE_RECEP - 1
000035 ELSE
000036 ANNE_RECEP
000037 END AS EXERCICE,
000038 IND_ASSOC
000039 FROM IV
000040 ;
000041 QUIT;
000042
000043 PROC SQL;
000043 CREATE TABLE IV_EXEC AS
000044 SELECT
000045 EXERCICE AS IVC_EXERCICE,
000046 IND_ASSOC AS IVC_IND_ASSOC,
000047 COUNT(IND_ASSOC) AS QTT_IND_ASSOC
000048 FROM IV_PREP
000049 GROUP BY EXERCICE, IND_ASSOC
000050 ;
000051 QUIT;
000052 /*
000009 //SASLIST DD SYSOUT=*
000010 //ENTRE1 DD DISP=SHR,DSN=PE5A.MFFFF001.S031020G(0)
000012 //SORTIE DD DSN=UE5A.MFFFF001.COUNT.IV,
000013 // UNIT=SYSALLDA,DISP=(,CATLG,DELETE),
000014 // DCB=(DSORG=PS,RECFM=FB,LRECL=100,BLKSIZE=0),
000015 // SPACE=(CYL,(1,10),RLSE)
000016 //SSAVE DD *
000017 //SYSIN DD *
000018 DATA IV;
000019 INFILE ENTRE1;
000020 INPUT @056 SDU $CHAR2.
000021 @085 SYS_EMET $CHAR2.
000022 @149 ANNE_RECEP 4.
000023 @153 MOIS_RECEP 2.
000024 @279 IND_ASSOC $CHAR1.;
000025 RUN;
000026
000027 PROC SQL;
000028 CREATE TABLE IV_PREP AS
000029 SELECT
000030 SDU,
000031 SYS_EMET,
000032 CASE
000033 WHEN MOIS_RECEP <= 3
000034 THEN ANNE_RECEP - 1
000035 ELSE
000036 ANNE_RECEP
000037 END AS EXERCICE,
000038 IND_ASSOC
000039 FROM IV
000040 ;
000041 QUIT;
000042
000043 PROC SQL;
000043 CREATE TABLE IV_EXEC AS
000044 SELECT
000045 EXERCICE AS IVC_EXERCICE,
000046 IND_ASSOC AS IVC_IND_ASSOC,
000047 COUNT(IND_ASSOC) AS QTT_IND_ASSOC
000048 FROM IV_PREP
000049 GROUP BY EXERCICE, IND_ASSOC
000050 ;
000051 QUIT;
000052 /*
The table I want to send to the SORTIE dataset is IVC_EXEC.
I have tried many ways like DATA _NULL_ or PROC Export, but none of them really worked
Thank you for your help