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

Hi,

 

When a stored process called via SPWA will generate drill down URL's pointing to other stored processes, I know that instead of hardcoding the server name  and port:

 

http://your.server:8080/SASStoredProcess/do?

You can soft code it with:

 

http://&_srvname:&_srvport/SASStoredProcess/do?  

 

That obviously makes code more portable when you change servers.

 

That said, is there an easy way to detect whether the session is using http or httpS ?   I still have that part of my URL hard coded, which means when a server changed to https:, I had to update the code.  I would like to soft code the protocol as well as the server name and port.

 

Thanks,

--Q.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
1 ACCEPTED SOLUTION

Accepted Solutions
Vince_SAS
Rhodochrosite | Level 12

It is "relative" to protocol://server:port

 

You can find some examples of using _URL here:

 

Chaining Stored Processes

http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#datapass.htm

 

For example:

 

nexturl = "&_URL?_program=/WebApps/MyWebApp/Print Color" || '&fname=' || urlencode("&FNAME");

 

Vince DelGobbo

SAS R&D

View solution in original post

4 REPLIES 4
Vince_SAS
Rhodochrosite | Level 12

Can you get by with using the _URL reserved macro variable?

 

Using Reserved Macro Variables

 

http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#p184mqqbi9w6qjn1q061...

 

Vince DelGobbo

SAS R&D

Quentin
Super User

Thanks @Vince . 

 

When I looked in _URL, I expected so see something like:

http://your.server:8080/SASStoredProcess/do?

What I actually see is:

 

/SASStoredProcess/do

 

Okay, it just hit me.  Is that a relative URL, so no need to the http and server and port is not necessary? 

 

So I could I could use it as the "root" URL for chaining stored processes?  So tha's what I should have been using all along for chaining stored processes??? sigh.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
Vince_SAS
Rhodochrosite | Level 12

It is "relative" to protocol://server:port

 

You can find some examples of using _URL here:

 

Chaining Stored Processes

http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#datapass.htm

 

For example:

 

nexturl = "&_URL?_program=/WebApps/MyWebApp/Print Color" || '&fname=' || urlencode("&FNAME");

 

Vince DelGobbo

SAS R&D

Quentin
Super User
Thanks Vince. Will file this under things I should have learned years ago. : )
The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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
  • 4 replies
  • 1317 views
  • 2 likes
  • 2 in conversation