BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
robertrao
Quartz | Level 8

Hi,

I have this number (PID)and we want to create two numbers from it

00000000-11111111

Please correct me

1 ACCEPTED SOLUTION

Accepted Solutions
suraestar
Calcite | Level 5

Hi Robertrao,

Yes, it is right.The index function returns a value of 9, so the substr function take the values from 10th position.

View solution in original post

3 REPLIES 3
data_null__
Jade | Level 19

Add 1 to the value returned by index.

robertrao
Quartz | Level 8

Could you please explain the full line ...what happens when 1 is added to the value returned by index???????/

so that position becomes the starting point for the substring instead of the usual "first position"?

In this example:

00000000-11111111

the index returns  a value of 9(hyphen is in the 9th position)

so +1 means "we are telling the substr function to take the values from 10th position????is that right?

aND FROM THERE WE ARE TAKING 9 CHARECTERS???/

suraestar
Calcite | Level 5

Hi Robertrao,

Yes, it is right.The index function returns a value of 9, so the substr function take the values from 10th position.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 707 views
  • 3 likes
  • 3 in conversation