Solved

AS/400 COBOL - how to read Data Area

Posted on 2001-07-23
8
2,211 Views
Last Modified: 2007-12-19
Is there anyone can help me with the syntax and
 possibly an explanation how to read Data Area on AS/400 using COBOL. If possible I would like to see an exemple of code. Please, I need an aswer as soon as possible.
0
Comment
Question by:Elena
8 Comments
 
LVL 2

Expert Comment

by:olidel
ID: 6309989
Hi,

   Is it not possible for you to do a CALL to QCMDEXC from your Cobol program so you can use the RTVDTAARA command. You just have to declare 2 variables : The first one should contain the command to be processed by the QCMDEXC program. The second variable should be define as a 15,5 packed digits. This variable should contain the real lenght of the command that you give to QCMDEXC.

Hope this help.

Bye



0
 
LVL 2

Accepted Solution

by:
xinger earned 50 total points
ID: 6310847
I think you will need to create a CL program in which you embed your RTVDTAARA command, and then call that CL program from your COBOL program.  Here's a very simple sample program:

PGM PARM(&DATAVALUE)
DCL VAR(&DATAVALUE) TYPE(*CHAR) LEN(10)
RTVDTAARA DTAARA(MYDATAAREA) VAR(&DATAVALUE)
END

and then in your COBOL program:

01  DATAVALUE PIC X(10).
CALL "CLPROGRAM" USING DATAVALUE.

I'm not 100% confident on the syntax above, but I think you can get the idea of what is needed.
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6311408
As far as I know, You can read and write data to an DATA-AREA exactly the same way as you do this for your LOCAL-DATA-AREA (with DISPLAY and ACCEPT).
This is only functioning when the data area is already opened in a previous step.
(So actually it is more like reading a 1 record file.)


0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6441020
Hi Elena,

Is it not working, or have you stoped thinking about us??
:-)
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 1

Expert Comment

by:Moondancer
ID: 6890893
Help requested, reponses provided and still open today.  Please return to your open questions and update/finalize them.

EXPERTS PLEASE HELP ME DECIDE THE FAIR OUTCOME FOR THIS QUESTION, if it remains open another seven (7) days, since we will need to finalize it.

Thank you,
Moondancer - EE Moderator
0
 
LVL 3

Expert Comment

by:P_S_Price
ID: 7149104
Give the Ponts to Murphey
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 7150799
Thaks PSP
0
 
LVL 32

Expert Comment

by:shalomc
ID: 8961794
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept xinger's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

ShalomC
EE Cleanup Volunteer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Driver Where can I find IBMDA400 driver software 5 2,108
as400 calendar 2 144
DB2 CONCAT FAILING 4 103
Restricting read/write operations to files 2 60
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now