BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Handihusen
Obsidian | Level 7
Please somebody can help me:
How can i get/cut some words in the middle of field with delimetted? For example i want get word "adminFee" and next characthers (the amount of admin fee) ?
Examples:
I have field "Remarks" with contents: //name://davids://amount://100000://adminfee://500//date://20220131//city://jakarta//
1 ACCEPTED SOLUTION

Accepted Solutions
Handihusen
Obsidian | Level 7
Thanks a lot mr/miss Koen.. you are the best 👍👍

View solution in original post

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

Build upon this :

data _NULL_;
remarks = '//name://davids://amount://100000://adminfee://500//date://20220131//city://jakarta//';
pos=index(remarks,'adminfee'); put pos=;
adminfee=substr(remarks,pos,20); put adminfee=;
adminfee_amount = input(compress(adminfee,'abcdefghijklmnopqrstuvwxyz:/'),best12.); put adminfee_amount=;
run;

 

Koen

Handihusen
Obsidian | Level 7
Thanks a lot mr/miss Koen.. you are the best 👍👍

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 785 views
  • 1 like
  • 2 in conversation