On 10/28/13 11:14 AM, Michael Ryan wrote:
Hi there -
I'm doing this:
QSH CMD('db2 "select count(*) from +
michael.mblsesp where session_end is +
null" | datarea -lw phpsess')
in a CL program, and I'm getting this:
CPF1062 "Null string not valid as character value."
I don't know why it would be a null string. I would think it would be
zero or some number. I'm missing something. Anyone do this?
FWiW: That error reflects that the [effective] request to Change Data
Area (CHGDTAARA) to the VALUE('') is not allowed; e.g. as sent by the OS
program QWCCCHVC that implements the /change/ method for the data in a
I am not familiar with the _datarea_ utility, but the standard output
from that DB2 SELECT is as I recall: one blank line, followed by the
count, followed by some other lines as followup reporting. I presume
the first blank line is the origin for the problem; i.e. I expect the
same effect as seen from:
qsh cmd(' datarea -wl phpsess "" ')
And as expected, the result was:
datarea: 001-2364 Error CPF1062 found changing data area using CL
command CHGDTAARA DTAARA(*LIBL/PHPSESS) VALUE(''). Null string not
valid as character value.
AFaIK the stdout will have to be filtered to get just the /row/ of
data from the report, in order to get that into the data area.
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
This mailing list archive is Copyright 1997-2013 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