BookmarkSubscribeRSS Feed
Amitkmr1979
Fluorite | Level 6

Hello Friends,

 

Probably the answer is in some post but I might not be using correct keyword to have a hit, but below is what I am trying to understand: 

 

I have PC SAS on which I code (connect to Unix - SAS/Connect), Deploy the Code on Mainframe for Scheduling where it runs on mainframe and connects to UNIX server for processing via SAS/connect. 

 

We have a routine which checks the return code and passes on to local server using sysrput where we handle and force abend the local session. 

 

What I want to understand is:

 

1) If I check the return code in remote and ge 4 and I issue a force ABEND in remote session - Will the local session terminate? What will the remote session return to local if I want to check without sysrput? 

 

2) I am looking for a way to ABEND the remote session i.e. within RSUBMIT blocks and to skip the rest of processing in remote session if additional statements post error and skip processing rest of statements in local if any statements present. 

 

Any link to understand the interaction when remote abend is issued and how to handle in local or how local session will behave will be helpful.

 

 

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

>  I am looking for a way to ABEND the remote session i.e. within RSUBMIT blocks and to skip the rest of processing in remote session if additional statements post error and skip processing rest of statements 

 

1. You can test &sysrc and &syscc at any time and issue a %abend statement if something is wrong.

2. More generally, this kind of ability to control a program flow has been an ongoing request for years.

 

 

 

SASKiwi
PROC Star

A better approach would be to ensure your remote SAS session uses the SAS option SYNTAXCHECK to switch into syntax checking mode when there is an error. That way you can use SYSRPUT to report the return code and SIGNOFF gracefully.

 

Doc link here: https://documentation.sas.com/?docsetId=lesysoptsref&docsetTarget=n014qbvh3po8w5n1qlqbzr22vtg0.htm&d...

Amitkmr1979
Fluorite | Level 6

Thanks guys, sorry for late response. I understand Syntaxcheck, but was hoping more seamless operation between different servers. 

 

I am going to post a question on same server communication if SAS can help me.

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
  • 3 replies
  • 812 views
  • 0 likes
  • 3 in conversation