Easytrieve query



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Easytrieve query

Postby shan111 » Fri Jun 19, 2009 6:48 pm

Hi All,

I am a beginner, trying to learn Easytrieve..I am stucked up while coding something like...
We have a requirement where in we need to take different file names dynamically as input to GET (if not GET, someother option to retrieve the data from all the files one by one). Could anyone please let us know how to code it in simpler way?

Let us say for example..I have a file with files-names as the records in it. I am taking this file as the input (DDname) and retrieving through 'GET <DDname>'. Now that, we want to retrieve the contents present in each record (i.e., file). Is it possible through arrays (tables)..?

Also, suggest some best ways of learning the subject...
shan111
 
Posts: 6
Joined: Wed Jun 17, 2009 6:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Easytrieve query

Postby dick scherrer » Sat Jun 20, 2009 1:41 am

Hello and welcome to the forum,

If you explain what you really want to do, someone may have a suggestion.

I have no idea how using arrays might help. . . Please clarify.

If all of the files have the same dcb attributes, you could concatenate all of them in a single dd.

Could anyone please let us know how to code it in simpler way?
A FILE statememt and a GET inside a loop is about as simple as it can be.

I'm not aware of good training material. Suggest you implement the examples in the manuals and look at other code already in use on your system. Looking at code that is already working can be most helpful.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Easytrieve query

Postby shan111 » Sat Jun 20, 2009 2:04 pm

Thanks Dick, for the warm welcome and suggestions!!
Definitely I will go through the working examples on my system.

As you have said, the concatenation could be a better way. But they are not of the same DCB attributes.

In my assignment, we have files coming from different applications and they have different DCB attributes. We have to do some processing like header date verification, debit and credit totals and so on for all the files. To do this, we wrote a code which works good, by taking one file at a time (only one DDname in the program). To do the same for multiple files, we included those many DDnames and repeated the corresponding code. But as this becomes redundant and tedious for more number of files, we want to use the same code for different files without repeating any of the code.
Please suggest us with this regard.

Please excuse me if I am still not clear with my explanation.
Thank you again for the reply!
shan111
 
Posts: 6
Joined: Wed Jun 17, 2009 6:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Easytrieve query

Postby dick scherrer » Sat Jun 20, 2009 6:58 pm

Hello,

we have files coming from different applications and they have different DCB attributes
Suggest the organization bite the bullet and standardize on a common format. There will probably be reluctance to do this, but it is the better long-term solution.

we want to use the same code for different files without repeating any of the code
Someone needs to have more realistic goals. . .

To do the same for multiple files, we included those many DDnames and repeated the corresponding code.
You might consider creating small, single-file programs to convert from the many formats to one common format for use in this program. When the "common format" files were created, the could be written to a gdg and all generatoins could be processed by a single dd statement. If one does not already exist, a header could be put at the front of the data to identify the source of this particular set of data in the combined file.

I'm aware of no way for Easytrieve to work with a variety of inputs/attributes as a single "file".
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post