Date: Tue, 20 Dec 2005 23:10:32 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: Fixed Delimited Layout
In-Reply-To: <FD4E9F96318DD04AA940A90D38A0DA073CAC7A@stlexch.summitmg.com>
Content-Type: text/plain; format=flowed
Nina,
You could use the dictionary tables and SQL to build your put statement.
Obviuosly it doesn't work bu tyou can figure out how to fill in the blanks.
data one ;
x = 'B' ;
y = 'AAAA' ;
z = 123456789 ;
run ;
proc sql ;
create table test as
select name , npos , length
from dictionary.columns
where libname = 'WORK'
and Memname = 'ONE' ;
run ;
/*Manipulate Data here to get your start positions the way you want*/
data test ;
set test ;
run ;
/* Create macro Var holding your put statement here*/
proc sql ;
select
into : PutState separated by ' '
from test ;
run ;
data _null_ ;
set one ;
put &PutState ;
run ;
Toby Dunn
From: "Worden, Nina" <nina.worden@SUMMITMARKETING.COM>
Reply-To: "Worden, Nina" <nina.worden@SUMMITMARKETING.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Fixed Delimited Layout
Date: Tue, 20 Dec 2005 16:48:38 -0600
MIME-Version: 1.0
Received: from bay0-mc1-f13.bay0.hotmail.com ([65.54.244.21]) by
imc2-s18.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 20 Dec 2005
14:48:54 -0800
Received: from malibu.cc.uga.edu ([128.192.1.103]) by
bay0-mc1-f13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 20
Dec 2005 14:48:38 -0800
Received: from listserv.cc.uga.edu (listserv.uga.edu [128.192.1.75])by
malibu.cc.uga.edu (8.12.11/8.12.11) with ESMTP id jBKJrqcc031724;Tue, 20 Dec
2005 17:47:57 -0500
Received: from LISTSERV.UGA.EDU by LISTSERV.UGA.EDU (LISTSERV-TCP/IP release
1.8d) with spool id 4819131 for SAS-L@LISTSERV.UGA.EDU; Tue, 20
Dec 2005 17:47:57 -0500
Received: from xwall.summitmg.com (xwall.summitmg.com [208.51.103.68]) by
listserv.cc.uga.edu (8.12.11/8.12.11) with ESMTP id jBKMlu53009354
for <SAS-L@LISTSERV.UGA.EDU>; Tue, 20 Dec 2005 17:47:57 -0500
Received: from atlexch.summitmg.com [10.100.1.208] by xwall.summitmg.com
with XWall v3.35d ; Tue, 20 Dec 2005 17:47:56 -0500
Received: from stlexch.summitmg.com ([10.106.1.200]) by atlexch.summitmg.com
with Microsoft SMTPSVC(6.0.3790.1830); Tue, 20 Dec 2005 17:47:55
-0500
X-Message-Info: eW1r7T5OXW51xRz/ysa6O/lNCZDzkBumI4UqmXMnVug=
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: Fixed Delimited Layout
Thread-Index: AcYFt4SLh2jgSc9FRn2rt2X0aUUhBQ==
X-OriginalArrivalTime: 20 Dec 2005 22:47:55.0673 (UTC)
FILETIME=[6ADE1090:01C605B7]
X-Scanned-By: Digested by UGA Mail Gateway on 128.192.1.75
Return-Path: owner-sas-l@LISTSERV.UGA.EDU
I need to output a text file in a fixed-delimited layout (column layout)
and trying to avoid a hundred PUT statements, suggestions?
Nina