MIDRANGE dot COM Mailing List Archive

Re: AS400 Commands -dependencies between elements


On 11/06/2008, at 9:38 AM, diego acevedo wrote:

I'm trying to create a command like CHGDTAARA one where there is a parameter called VALUE that consists of three elements: a start position, string length and the value; this parameter shows *ALL as a default value wich means "starting at first position and max length assigned (2000)", but if I want to enter a different value into the first element (starting position) and none of the second (string length) I want to send a CPD0072 message just like CHGDTAARA command does.

I tried to use de DEP (dependencies) statement but is not working because both elements belongs to the same parameter (e.g: they has the same keyword)

Yep, can't do that. Specify MIN(1) for each of the element items. A SNGVAL on the first element will override the MIN(1) when *ALL is used but causes CPD0072 otherwise.

Could anybody help me with this?
Thank you very much
Diego Acevedo

ps: here is the source code of my command.

Cmd 'Set LDA from other jobs'

Parm job job min(1) prompt('Job name')
job: +
Qual *name 10
Qual *name 10 prompt('User')
Qual *char 6 range(000000 999999) prompt('Number')

Parm option *char 4 rstd(*yes) dft(*get) values(*get *set) prompt ('Opt+
Parm value List1 choice(*none) pmtctl(IsSet) prompt('Substring definit+

List1: +
Elem *int2 dft(*all) range(1 2000) spcval((*all 1)) expr(*yes) prompt(+
'Substring start position')
Elem *int2 range(1 2000) expr(*yes) prompt('Substring length')
Elem *char 32 expr(*yes) prompt('Value')
IsSet: +
PmtCtl option ((*EQ '*SET'))

Not tested but something like (my changes in caps):

Elem *int2 dft(*all) range(1 2000) SNGVAL((*all 1)) expr(*yes) prompt(+
'Substring start position')
Elem *int2 MIN(1) range(1 2000) expr(*yes) prompt('Substring length')
Elem *char 32 MIN(1) expr(*yes) prompt('Value')

Simon Coulter.
FlyByNight Software OS/400, i5/OS Technical Specialists

Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
ASCII Ribbon campaign against HTML E-Mail / \

Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot 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 here. If you have questions about this, please contact