|
Hi Jeff,
If you want four separate parameters instead of using lists, then I think
you can use this:
PARM KWD(FRTIME) TYPE(*TIME) DFT(*AVAIL) +
SPCVAL((*AVAIL 000000)) EXPR(*YES) +
PROMPT('Beginning time')
PARM KWD(FRDATE) TYPE(*DATE) DFT(*CURRENT) +
SPCVAL((*CURRENT 000004) (*BEGIN 000005)) +
EXPR(*YES) PROMPT('Beginning date')
PARM KWD(TOTIME) TYPE(*TIME) DFT(*AVAIL) +
SPCVAL((*AVAIL 235959)) EXPR(*YES) +
PROMPT('Ending time')
PARM KWD(TODATE) TYPE(*DATE) DFT(*CURRENT) +
SPCVAL((*CURRENT 000004) (*END 000006)) +
EXPR(*YES) PROMPT('Ending date')
This is untested but it did compile.
Also, if you like to keep things simpler, you don't need to use replacement
values for *AVAIL, *CURRENT, etc.
It's just a matter of style.
Yours truly,
Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Work: (905) 486-1162 x 239
Cell: (416) 317-3144
On 24 October 2016 at 09:41, Jeff Young <jyoung0950@xxxxxxxxx> wrote:
Vern,command
That is what Glen did and the source that he sent me uses the ELEM
within the command definition to define these values. The originalissue I
had that prompted this discussion is the using the PARM command, it willvhamberg@xxxxxxxxxxxxxxx>
not allow any special values for DATE or TIME data types.
If I need to, I can use the list that is generated, but was hoping that
there was another method.
Jeff Young
Sr. Programmer Analyst
On Mon, Oct 24, 2016 at 9:32 AM, Vernon Hamberg <
wrote:=
Maybe I'm late in this - DSPLOG lets you specify *CURRENT for the date
thatit uses *AVAIL for time.Q??RCMDI
There is an API that lets you retrieve the source for a command -
or Q??RCMDD I think. Run this over the DSPLOG command and see what I BMdid.
using
HTH
Vern
On 10/24/2016 8:12 AM, Jeff Young wrote:
Thanks Peter.
Once upon a time (back in the early days of ths S/38), I actually knew
that.
I appreciate all the help I have received with this.
Do you (or anyone) know how to do what I am attempting to do without
DATElists?
What my goal is is to define a command parm that will be defined as a
value, but will allow the special value *CURRENT, and a TIME value
wrote:will allow the special values *CURRENT and *AVAILABLE.
Thanks,
Jeff Young
Sr. Programmer Analyst
On Fri, Oct 21, 2016 at 4:30 PM, Peter Dow <petercdow@xxxxxxxxx>
.what
Hi Jeff,
If you're using Glenn's command definition, you need to be aware of
Checkthe system does when you use a type that includes ELEM statements.
out http://www.ibm.com/support/knowledgecenter/ssw_i5_54/cl/elem.htm
Processing
For the parm defined by
PARM KWD(PERIOD) +
TYPE(E01C5) +
CHOICE(*NONE) +
PROMPT('Time period for log output' 2)
E01C5: ELEM TYPE(E01FF) +
CHOICE(*NONE) +
PROMPT('Start time and date')
ELEM TYPE(E0272) +
CHOICE(*NONE) +
PROMPT('End time and date')
E01FF: ELEM TYPE(*TIME) +
DFT(*AVAIL) +
SPCVAL( +
(*AVAIL 000000)) +
EXPR(*YES) +
PROMPT('Beginning time')
ELEM TYPE(*DATE) +
DFT(*CURRENT) +
SPCVAL( +
(*CURRENT 000004) +
(*BEGIN 000005)) +
EXPR(*YES) +
PROMPT('Beginning date')
E0272: ELEM TYPE(*TIME) +
DFT(*AVAIL) +
SPCVAL( +
(*AVAIL 235959)) +
EXPR(*YES) +
PROMPT('Ending time')
ELEM TYPE(*DATE) +
DFT(*CURRENT) +
SPCVAL( +
(*CURRENT 000004) +
(*END 000006)) +
EXPR(*YES) +
PROMPT('Ending date')
here's what the system is going to pass to the CPP (Command
23Program):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
2402
25 26 27 28 29 30 31 32 33 34 35 36
00 02 00 15 00 06 00 02 F2 F3 F5 F9 F5 F9 F0 F0 F4 F0 F0 F0 F0 00
F0Offset
^F0 F0 F0 F0 F0 F0 F0 F4 F0 F0 F0 F0
^ ^ ^ ^ ^ ^ ^
|^
| | | | | | |
"StartingBeginning of value for 1st ELEM's 2nd ELEM, i.e.
date"
| | | | | | |
Beginning of value for 1st ELEM's 1st ELEM, i.e. "Starting time"
| | | | | |
2ndx'0015' is beginning of 1st ELEM.
| | | | | Beginning of value for
thisELEM's 2nd ELEM, i.e. "End date"
| | | | Beginning of value for 2nd ELEM's 1st ELEM,
i.e.
"End time"
| | | Beginning of ELEM at offset x'0006'. Note that
That'sis
the 2nd ELEM
| | Offset to second ELEM's value within this parm
| Offset to first ELEM's value within this parm
Number of elements in the list
The first thing to notice is that it's passing 36 bytes, not 26.
thingbecause ELEM statements indicate elements in a list, so the first
ELEM.the
system tells you is how many elements there are in your list, in this
case
2. Then it passes you a list of offsets to the beginning of each
the
The second thing to notice is that the first offset is larger than
youthesecond offset. That means the value for the first ELEM comes /after/
value for the second ELEM.
The third thing is that each of those 2 ELEMs is defined as two more
ELEMs. So the first thing you get in the value for that ELEM is the
number
of ELEMs in /that/ list. Because these secondary ELEMs are defined as
basic
types (i.e. *DATE and *TIME), there are no offsets to those values,
asnumberjust have to know the size for each type.
For the *TIME data type, the system passes a 6-digit zoned decimal
numberof the format hhmmss.
For the *DATE data type, the system passes a 7-digit zoned decimal
numberof the format cyymmdd.
Since the PARM is not defined as a list itself (i.e. MAX(1)), the
yourof ELEMs will always be 2. Same for the sub ELEMs. So you can define
CL variable to hold the parm as *char 36. Then retrieve the values
mailingto
start date: %sst(&P01 30 7)
start time: %sst(&P01 24 6)
end date: %sst(&P01 15 7)
end time: %sst(&P01 9 6)
You can convert the dates with the CVTDAT command.
--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx>
/On 10/21/2016 11:00 AM, Jeff Young wrote:
Glen,
Using the information provided, I created a test command and program
*ENDdetermine what data is passed:
This is my CL program:
PGM PARM(&p01)
dcl &p01 *char 26
chgvar &p01 &p01
return
ENDPGM
Using the default values, I get this in my input parm:
Time period for log output:
Start time and date:
Beginning time . . . . . . . . *AVAIL Time, *AVAIL
Beginning date . . . . . . . . *CURRENT Date, *CURRENT,
*BEGIN
End time and date:
Ending time . . . . . . . . . *AVAIL Time, *AVAIL
Ending date . . . . . . . . . *CURRENT Date, *CURRENT,
........23595900EVAL &p01
&P01 = ' 2359590040000 000'
EVAL &p01 :x
00000 00020015 00060002 F2F3F5F9 F5F9F0F0 -
40000..000......00010 F4F0F0F0 F00002F0 F0F0.... ........ -
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
What am I missing?
--
listlist--list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.