problem occured while running a qsh command

435 pts.
Tags:
AS/400
AS/400 errors
Data Area
QSH
The following command wrote ABC to my data area. (as a text value)  

Software/Hardware used:
as400

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • munduuu
    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?
    435 pointsBadges:
    report
  • munduuu
    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
    435 pointsBadges:
    report
  • TomLiotta
    ...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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following