Try using the Qshell utility that is designed for data areas:<pre>
datarea -w /qsys.lib/sequenceda.dtaara $(echo '01/01/10')</pre>
See <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzahz/datarea.htm">datarea - Read or write i5/OS(TM) data area</a> for details.
However, it is not a good idea to be creating your own objects in library QSYS. It is especially not a good idea to be experimenting while creating objects in QSYS. Use a different library.
I don't know anything about the arsdate command. You will need to tell us what arsdate does before we can help with that.
Tom
Last Wiki Answer Submitted: May 20, 2010 2:37 pm by TomLiotta108,310 pts.
All Answer Wiki Contributors: TomLiotta108,310 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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.
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
A local data area (*LDA) is “local” to a job. A *LDA in a Qshell job won’t be the same *LDA as the one in the job that runs a STRQSH command. The two jobs have two different *LDA data areas. One job can’t change the *LDA in another job.
When you run STRQSH, a new job starts. The Qshell job runs the Qshell utility or script that is supplied in the STRQSH CMD() parameter. But it is a different job.
Under some circumstances, a job will start with a copy of the *LDA from another job. But it is only a copy. If you change it, the original *LDA does not get changed.
A *LDA shouldn’t be used for communication in or out of a Qshell session. Use a different kind of object. (Actually, you probably shouldn’t be using *LDAs at all for communication between process functions. They are nearly obsolete due to the changes in system architecture.)
Why are you using Qshell for this? Why don’t you just call the arsdate program directly from CL?
The following command wrote ABC to my data area. (as a text value)
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?
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
…local data area (*lda)…
A local data area (*LDA) is “local” to a job. A *LDA in a Qshell job won’t be the same *LDA as the one in the job that runs a STRQSH command. The two jobs have two different *LDA data areas. One job can’t change the *LDA in another job.
When you run STRQSH, a new job starts. The Qshell job runs the Qshell utility or script that is supplied in the STRQSH CMD() parameter. But it is a different job.
Under some circumstances, a job will start with a copy of the *LDA from another job. But it is only a copy. If you change it, the original *LDA does not get changed.
A *LDA shouldn’t be used for communication in or out of a Qshell session. Use a different kind of object. (Actually, you probably shouldn’t be using *LDAs at all for communication between process functions. They are nearly obsolete due to the changes in system architecture.)
Why are you using Qshell for this? Why don’t you just call the arsdate program directly from CL?
Tom