09-21-2011 08:59 PM
I am writting a SAS dataset to a file. Accourding to my coding , it doesn't write the 2nd and continues records properly in the output file. when I put recfm=v, it does write properly on file. Can any one tell the reason for this. or Am I doing right if put recfm=v?
LIBNAME SWXTEST 'C:\mylib\MAY2011';
FILENAME SWXTEST1 'C:\v_sas_mytest.txt' ;
file swxtest1 LRECL=4046 RECFM=F ;
PUT @ 1 APPID 8.
@ 9 APPTITLE $100.
@ 109 ORIGINBRANCHID $6.
@ 115 ORIGINOFFICERID $1.
@ 116 PRIBORTYPE $1.
@ 117 PRIBORID 8.
@ 125 INSTANTRESP $1.
@ 126 DATEAPPENTRYSTART datetime20.
@ 146 PERSONNELID 8.
@ 154 APPLICATIONSOURCE $20.
@ 174 FRSTNAM $15.
@ 189 LSTNAME $25.
@ 214 EMPLOYNUM 8.
@ 222 ATTACHREQ $3.
@ 225 APPLICATIONTYPE $4000.
@ 4225 SWXVAILABLEREVOLVINGCREDIT 10.2
@ 4235 SWXRETURNEDTOBRANCH $1.
@ 4236 SWXTOTALCREDITSTOCONNECTIONS 10.2
@ 4246 SWXCONNECTEDBUSINESSCREDIT 10.2 ;
Thanks very much in advance
09-21-2011 09:24 PM
First a question: what does it do when you specify an lrecl that is as large as the record you are trying to write?
You specify 4046 but then try to write a record that is at least 4255 characters wide.
09-21-2011 09:51 PM
It is my typo. I tried with 4255 with the record lenght as well and put the recfm=f. but the problem is it is writting the second record very far. It is not write 2nd record at the 4256 column. or row after 4256 column.
Need further help from the community? Please ask a new question.