BookmarkSubscribeRSS Feed
Jaheuk
Obsidian | Level 7
dear all,
code below works fine on PC:
proc format ;
VALUE ZERO
0 = ' '
other = [commax15.]
;
RUN;

BUT on mainframe not the formatted value is printed but the string [commax15.]

any ideas?

Regards,
Herman
6 REPLIES 6
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Share with us some SAS-generated log output that demonstrates the behavior you are encountering, with all of your SAS code revealed (that would include a formatted PUT in a DATA or PROC step output. You will want to first desk-check to see if SAS has correctly applied your output FORMAT -- by doing a PROC CONTENTS against your SAS file. What you have shown in your post is only a piece of what is required to make the process work -- now you need to convey what SAS code that references your format is not working for you.

Scott Barry
SBBWorks, Inc.
Jaheuk
Obsidian | Level 7
NO errors appear in the log, format is used in proc report
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Okay - now share all SAS code related to the problem, which would include your PROC REPORT code, otherwise it is a guessing game (whether or not the "mainframe" is involved).

Scott Barry
SBBWorks, Inc.
Peter_C
Rhodochrosite | Level 12
Jaheuk
for me, "commax" indicates you are probably suffering a code-page issue in NLS (national language support) with the square brackets on zOS.
I don't recall clearly but in SAS6 days (where I got most of my more-recent 😉 experience of zOS-SAS) there was a work-around with iirc !( and !) or something like that. (in the last millennium!! the zOS keyboards I worked on did not support square brackets so SAS provided those alternatives.
At http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000205506.htm the CHARCODE system option is documented describing how characters required by syntax but not on a "keyboard", can be achieved with a ?-combination.
I was wrong about ?( and ?) That documentation shows it should be ?< and ?>

good luck
peterC
Robert_Bardos
Fluorite | Level 6
Could you post the result of a
[pre]
proc format fmtlib;
select zero;
run;
[/pre]
run on your mainframe? (In case I have the syntax wrong, the intent is to display the format definition as it was interpreted by SAS when the format was created).
Patrick
Opal | Level 21
Hi

May be what you observe is related to this issue:
http://support.sas.com/kb/35/029.html

And different OS could behave different (i.e. different patch levels).

I would give the suggestions in the SAS note a go:
"A possible circumvention for this issue is to assign a width on the FORMAT statement."

HTH
Patrick Message was edited by: Patrick

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!

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
  • 6 replies
  • 1361 views
  • 0 likes
  • 5 in conversation