[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

AS/400 COBOL - how to read Data Area

Posted on 2001-07-23
8
Medium Priority
?
2,526 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 150 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6441020
Hi Elena,

Is it not working, or have you stoped thinking about us??
:-)
0
 
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 33

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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

649 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