- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.