Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Delimit records by tab key using SAS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Tue Feb 22, 2011 11:32 am    Post subject:
Reply with quote

Robert Sample wrote:
The SET statement option NOBS could also be used.


I also have one requirment that in the detail record I have to delimit fields by
hex 09(which is the tab key). How can I do that in SAS program?
Can you please advise
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 22, 2011 1:04 pm    Post subject:
Reply with quote

SAS is not COBOL, so please post in the appropriate forum.

What logic have you thought of and tried so far. It can be done with SAS quite easily as I have done the same thing but using '25'X as the delimiter.
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Tue Feb 22, 2011 2:11 pm    Post subject:
Reply with quote

expat wrote:
SAS is not COBOL, so please post in the appropriate forum.

What logic have you thought of and tried so far. It can be done with SAS quite easily as I have done the same thing but using '25'X as the delimiter.


To be frank, I am new to SAS. So no idea how should I do that.

So please advise for my following question.

Lets say I have following output layout for a SAS dataset

PUT
SSN 6.
@07 ' '
CODE $ 8-17
@18 ' '
VEN_NO 8.
@27 ' '
MEMBER $ 28-37
@38 ' '
CLIENT $ 39-48
@49 ' '
CLIENT_NAME $ 50-149

Right now I am using SPACE as delimiter. Can you please advise what should I put over here.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 22, 2011 3:03 pm    Post subject:
Reply with quote

@07 '09'X

etc.
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Tue Feb 22, 2011 4:03 pm    Post subject:
Reply with quote

PeterHolland wrote:
@07 '09'X

etc.


Posted: Tue Feb 22, 2011 2:11 pm Post subject:

--------------------------------------------------------------------------------

expat wrote:
SAS is not COBOL, so please post in the appropriate forum.

What logic have you thought of and tried so far. It can be done with SAS quite easily as I have done the same thing but using '25'X as the delimiter.


To be frank, I am new to SAS. So no idea how should I do that.

So please advise for my following question.

Lets say I have following output layout for a SAS dataset
So my final output layout should be like following?
PUT
SSN 6.
@07 '09'X
CODE $ 8-17
@18 '09'X
VEN_NO 8.
@27 '09'X
MEMBER $ 28-37
@38 '09'X
CLIENT $ 39-48
@49 '09'X
CLIENT_NAME $ 50-149
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 22, 2011 4:30 pm    Post subject:
Reply with quote

Yep, and dont forget the terminating ";" at CLIENT_NAME $ 50-149;

And change your CODE $ 8-17 to CODE $CHAR10. and accordingly also
your other character fields.

And read the :

SAS Language Reference
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Tue Feb 22, 2011 5:28 pm    Post subject:
Reply with quote

PeterHolland wrote:
Yep, and dont forget the terminating ";" at CLIENT_NAME $ 50-149;

And change your CODE $ 8-17 to CODE $CHAR10. and accordingly also
your other character fields.

And read the :

SAS Language Reference


Okay thanks. One last question. if I want to initialize 2 fields by spaces, how can I do that?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 22, 2011 5:32 pm    Post subject:
Reply with quote

You could actually read the manuals
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Tue Feb 22, 2011 5:33 pm    Post subject:
Reply with quote

Quote:
if I want to initialize 2 fields by spaces, how can I do that?
How about
Code:
FIELD1 = ' ';
FIELD2 = ' ' ;


HTTP://WWW.SAS.COM has all the manuals available and you could read them online -- or buy a book on SAS?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue Feb 22, 2011 5:33 pm    Post subject:
Reply with quote

Hi,
Quote:
@07 '09'X


For EBCDIC '05'x is tab.
'09'x is tab for ASCII.

Thanks,
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 22, 2011 6:09 pm    Post subject:
Reply with quote

vasanthz,

thats right. My bad. But what if the TS is using SAS for the PC? See his first post.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue Feb 22, 2011 6:18 pm    Post subject:
Reply with quote

Oh ok u are right, TS must be using PC SAS icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us