jrowden773
Programmer
- Oct 19, 2007
- 9
I have a program where I use the example below from the Websphere on using %KDS but my question is if the key list is not all Character type and is a mixture of character and numeric how do you get around this?
It complies when I do it this way but a get a decimal data error when I hit SETLL %KDS(pgreckeys) pgrec.
Any suggestions would be greatly appreciated as I realize that this maybe a newer technique then a traditional key list and I would like to know how to use it.
A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++
A R CUSTR
A NAME 100A
A ZIP 10A
A ADDR 100A
A K NAME
A K ZIP
FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++
Fcustfile if e k disk rename(CUSTR:custRec)
DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++
D custRecKeys ds likerec(custRec : *key)
...
/free
// custRecKeys is a qualified data structure
custRecKeys.name = customer;
custRecKeys.zip = zipcode;
// the *KEY data structure is used as the search argument for CHAIN
chain %kds(custRecKeys) custRec;
/end-free
It complies when I do it this way but a get a decimal data error when I hit SETLL %KDS(pgreckeys) pgrec.
Any suggestions would be greatly appreciated as I realize that this maybe a newer technique then a traditional key list and I would like to know how to use it.
A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++
A R CUSTR
A NAME 100A
A ZIP 10A
A ADDR 100A
A K NAME
A K ZIP
FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++
Fcustfile if e k disk rename(CUSTR:custRec)
DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++
D custRecKeys ds likerec(custRec : *key)
...
/free
// custRecKeys is a qualified data structure
custRecKeys.name = customer;
custRecKeys.zip = zipcode;
// the *KEY data structure is used as the search argument for CHAIN
chain %kds(custRecKeys) custRec;
/end-free