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 👍👍

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 871 views
  • 1 like
  • 2 in conversation