Where allowed to run:
|
Parameters Examples Error messages |
The Ask User for Date (ASKDATE) command prompts the end-user for a date or date range. Controls are provided that allow the programmer to modify the prompt text for each component on the screen, along with whether one or two dates are prompted. When two dates are prompted, the user is instructed to type in a Date Range, when one date is prompted the user is instructued to type in a valid date.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
DATFMT | Format of user entered date | *JOB, *YMD, *DMY, *MDY, *ISO, *USA, *JIS, *MMYYYY, *MMYY, *YYYYMM, *YYMM | Optional, Positional 1 |
RTNSEP | DATSEP added to return date(s) | *NONE, *DATFMT, *DATSEP | Optional, Positional 2 |
DATE | Date 1 | Element list | Optional, Positional 3 |
Element 1: Initial value | Date, *JOB, *SYS, *BOM, *PREVEOM, *EOM, *BLANKS | ||
Element 2: Prompt Text | Character value, *DFT | ||
DATE2 | Date 2 | Single values: *NONE Other values: Element list |
Optional, Positional 4 |
Element 1: Initial value | Date, *JOB, *FROMDATE, *SYS, *BOM, *PREVEOM, *EOM, *BLANKS | ||
Element 2: Prompt text | Character value, *DFT | ||
TITLE | Dialog titles | Element list | Optional, Positional 5 |
Element 1: Main Title | Character value, *DFT | ||
Element 2: Subtitle line 1 | Character value, *DFT | ||
Element 3: Subtitle line 2 | Character value, *DFT | ||
Element 4: Title for "type dates..." | Character value, *DFT | ||
RTNDATE | CL var for returned date | Not restricted | Optional, Positional 6 |
RTNFMT | Format of returned date | Character value, *JOB, *JOB0, *MDY, *MDY0, *DMY, *DMY0, *YMD, *YMD0, *JUL, *MDYY, *DMYY, *YYMD, *CYMD, *ISO, *USA, *EUR, *JIS | Optional, Positional 7 |
RTNDATE2 | CL var for 2nd returned date | Not restricted | Optional, Positional 8 |
RTNFMT2 | Format of 2nd returned date | Character value, *FMT1, *JOB, *JOB0, *MDY, *MDY0, *DMY, *DMY0, *YMD, *YMD0, *JUL, *MDYY, *DMYY, *YYMD, *CYMD, *ISO, *USA, *EUR, *JIS | Optional, Positional 9 |
RTNMM | CL Var for returned Month | Decimal number | Optional, Positional 10 |
RTNYY | CL Var for returned Year | Decimal number | Optional, Positional 11 |
RTNMM2 | CL Var for returned Month 2 | Decimal number | Optional, Positional 12 |
RTNYY2 | CL Var for returned Year 2 | Decimal number | Optional, Positional 13 |
RTNFKEY | CL Variable for Fn Key pressed | Character value | Optional, Positional 14 |
Top |
Specifies format for the date(s) being typed in by the end-user. The date prompt is always 10 positions in length, however the date format controls the validity checking performed on the date entered by the end-user.
Top |
Specify an override to the date separator for dates values returned by the command. This parameter is ignored when the CL variable for the returened date is numeric. Use this parameter to override the default date separator character for the specified RTNFMT (Return Date Format). For example, when a value of RTNFMT(*MDY) is specified, the default returned separator is the slash symbol, so a date of MM/DD/YY is returned when a *CHAR CL variable is specified. Specifying a date format of RTNFMT(*MDY0) returns MMDDYY instead. However, when RTNSEP(*NONE) is specified, all date formats are overriden to include a no-separator option. That is the 0 is appended to the date format code.
Top |
Specifies value and properties for the first (or only) date value.
Element 1: Initial value
Element 2: Prompt Text
Top |
Specifies the properties of the second date when a date range is requested.
Single values
Element 1: Initial value
Element 2: Prompt text
Top |
Specifies the title and subtitle text that appears in the popup window for the date prompter.
Element 1: Main Title
Element 2: Subtitle line 1
Element 3: Subtitle line 2
Top |
Specify a CL variable that receives the date the end-user typed into the prompt.
Top |
Specify the format for the date value returned on the RTNDATE parameter.
Top |
Specify a CL variable that receives the 2nd date that was typed into the prompt by the end-user. If no 2nd date is prompted, no value is returned to this parameter.
Top |
Specify the format for the date value returned on the RTNDATE parameter.
Top |
Specify a CL variable with a LEN(2 0) TYPE(*DEC) that receives the month from the Date. If *MMYY or *MMYYYY are specified as the date format, the month returned is the month portion. If another date format is requested, the month returned to this variable is extracted from the Date entered by the User.
Top |
Specify a CL variable with a LEN(4 0) TYPE(*DEC) that receives the Year from the Date. If *MMYY or *MMYYYY are specified as the date format, the Year returned is the Year portion. If another date format is requested, the Year returned to this variable is extracted from the Date entered by the User. If the return format is *MMYY the returned value is a 2-digit year. Other other date formats return a 4-digit year.
Top |
Top |
Top |
Specify a CL variable Type(*CHAR) Len(1) that receives the Attention Identification Byte (Fkey) used to return from the ASKDATE prompt. This value is also set in the IBM Function Key Area and may be retrieved using the COZTOOLS RTVEXITKEY command.
Top |
Example 1: Simple Command Example
ASKDATE KWD1(PARMVAL1)
This command <...>
Example 2: More Complex Command Example
ASKDATE KWD1(PARMVAL1) KWD2(PARMVAL2) KWD3(PARMVAL3)
This command <...>
Top |
*ESCAPE Messages
Top |