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

Community,  using sas v9.4 on the mainframe just trying to get a simple proof of concept batch job to work with limited results.

I've seen the myriad examples and I'm sure I'm doing something dopey but am at wits end.

This jcl:

//IDS EXEC SAS,OPTIONS='CPUID,NOTES'
//SAS.SASLOG DD SYSOUT=*
//SAS.SASLIST DD SYSOUT=*
//SYSIN DD *
OPTIONS EMAILSYS = SMTP;
OPTIONS EMAILHOST = XXXXXX.YADA.COM;
FILENAME MYEMAIL EMAIL
TO="MYUSERID.XXX.COM"
SUBJECT="CODER'S CORNER"
TYPE="TEXT/PLAIN";
DATA _NULL_;
FILE MYEMAIL;
PUT "PLEASE ATTENDED CODER'S CORNER";
RUN;
FILENAME MYEMAIL CLEAR;

 

Sends the email to my Microsoft Outlook mailbox, Subject looks just fine, but the one line

I have in the body "PLEASE ATTENDED CODERS CORNER"  comes across in the body of the email as

WSEAbE@AccEUDED@CVDEY}b@CVYUEY

 

What is causing the put statement to get garbled??

thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Any standard text on a mainframe is created using the EBCDIC code.

Try something like

length charvar $50;
charvar = "Please attend coder's corner";
put charvar $ascii50.;

to convert the text to ASCII.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

Any standard text on a mainframe is created using the EBCDIC code.

Try something like

length charvar $50;
charvar = "Please attend coder's corner";
put charvar $ascii50.;

to convert the text to ASCII.

mbieganski
Calcite | Level 5

worked like a charm!!   Thanks a million Kurt!

 

Best,

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 2 replies
  • 1928 views
  • 0 likes
  • 2 in conversation