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

I created a shared numeric prompt (From_Amt) in SAS Management Console since I will have 10 reports using this prompt.  When I built the prompt, it had settings for 'minimum' & 'maximum' values allowed.  I assume this is the value, not the length so I did not set it. Note, I also built prompt (To_Amt) the same way.

 

I built the first stored process pulling in this shared prompt.  When I test running the STP, at the prompt for 'From_Amt' I entered a 10 digit numeric value (0123456789) 10 digits.   A red warning icon appears and displays 'invalid value for this prompt'.  If I change the

From_Amt' to value (012345678) 9 digits, it accepts this.  If I have no min & max amounts defined, why does it accept a 9 digit From_Amt but errors on 10 digit From_Amt.  I am very confused on this!

 

Any suggestions would be appreciated!

 

 

Update:

In testing, in set the max & min amounts to a 10 digit values, it works.  However,  once I set the maximum value to an 11 digit value, I get an error (snapshot below).  My users need to be able to enter a values up to a 11 digit number such as '99290058895'. 

 

I can't find anything that tells me there is a limit on the min & max values on a numeric prompt.   I have several other prompts I need to build the same way so I am basically hung up on this right now.

1 ACCEPTED SOLUTION

Accepted Solutions
ncsthbell
Quartz | Level 8

To resolve my issue I wound up creating the prompt variables as text data type then converting them to numeric once I read them into the stored process.  It is the prompt that has the limit so I can use a number larger than that limit in my where clause successfully.

View solution in original post

4 REPLIES 4
DartRodrigo
Lapis Lazuli | Level 10

Hi mate,

 

Provide Minimum and Maximum Prompt Values

If you know the data starts at and ends in a certain time frame, then don’t allow the user to select past those values.  Check theSAS Stored Process: How do I use a Date Range Prompt? for an example of setting minimum and maximum date values. 

Here’s some examples to give you some other ideas. For numeric prompts, if you know the user cannot select a value greater than 100, then limit the value to 100.  Likewise, if you are allowing the user to type a value, then set the minimum value to 5.  It is more likely to be a word.  You have to decide based on your data – but I hope this example just gives you some ideas of how to use the prompts built-in error-checking.

 

 

These built-in error checks from SAS will save you a lot of coding – so use them to make your stored process more robust and usable.  But mainly to prevent users calling you to report what your stored process does not do.

 

Hope this helps

ncsthbell
Quartz | Level 8

I understand that but I am also not using a date prompt.   I have searched and can not find anything that tells me the 'limitations' for the 'minimum' & 'maximum' values on a numeric prompt being created.

 

In testing, in set the max & min amounts to a 10 digit values, it works.  However,  once I set the maximum value to an 11 digit value, I get an error (snapshot below).  My users need to be able to enter a values up to a 11 digit number such as '99290058895'. 

 

I can't find anything that tells me there is a limit on the min & max values on a numeric prompt.   I have several other prompts I need to build the same way so I am basically hung up on this right now.

 

 

andreas_lds
Jade | Level 19

The error message i get is (translated): A number greater than -2.147.483.649 and smaller than 2.147.483.648 is required.Using EG 6.1 32 Bit.

 

I recommend opening a track with tech support.

 

 

ncsthbell
Quartz | Level 8

To resolve my issue I wound up creating the prompt variables as text data type then converting them to numeric once I read them into the stored process.  It is the prompt that has the limit so I can use a number larger than that limit in my where clause successfully.

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