i want to write the output of a qshell command to local data area so that it could be globally used by programs.is there some way to write from stdout file to local data area .I want it to be done through CL..its urgent thanks
QSH CMD('system chgdtaara dtaara\(qgpl/dataarea\) value\($(echo test)\)')
The following command wrote ABC to my data area. (as a text value)
**system chgdtaara dtaara\(qsys/sequenceda\) value\($(echo abc)\)**
However, while trying to write the output of arsdate to a data area, I ran the following command:
system chgdtaara dtaara\(qsys/sequenceda\) value\($('arsdate -a 01/01/10')\)
These were the errors received:
qsh: 001-0014 Command arsdate -a 01/01/10 not found.
CPD0071: Parameter VALUE required.
CPF0001: Error found on CHGDTAARA command.
CPC2206: Ownership of object QZSHSYSTEM in QTEMP type *USRSPC changed.
Can you figure out a way to accomplish this?
DATAREA -w /qsys.lib/testlibr.lib/dataartest.dtaara $(arsdate -a “05/21/10″)
This command copies the output of the qshell command arsdate into a data area dataartest in testlibr library. arsdate command returns the qshell date equivalent of an mm/dd/yy. Eg. 14751 is the qshell date equivalent of 05/21/10.
$
arsdate -a “05/21/10″ 05/21/10 -> 14751 $
actually i want to the output of this command to local data area (*lda) instead of copying it to dataartest…..please help me out
I don't think you can update the *LDA from qshell ... as commands run through it, I think, are in a separate job.
You might want to consider using a named data queue ... you can use the dataq
command from qshell.
It would probably be best to use a keyed data queue ... but I'm unsure how you would specify the key on the dataq command.