The input has got million records. I would like to pull all the records having string starting with "DCG" to output using EASYTRIEVE. The string with "DCG" can appear within LRECL of 400 (66 possibilities in one record !!)
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Sun Jan 19, 2014 10:53 pm Post subject:
ranga_subham,
You have been a member of this forum for about 7 years and you haven't even searched the topics for a similar solution. Check these links. Change the samples to suit your requirement.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue Jan 21, 2014 4:12 pm Post subject:
As Papadi pointed out we can use DFSORT parse function to get the desired results. With DFSORT V2R1 which was available from Sep 30th 2013 you can use REPEAT=n for parsing fields with same length.
The following DFSORT JCL will give you the desired results
Posted: Wed Jan 22, 2014 6:09 am Post subject: thanks
Kolusu, thank you very much for SORT solution. I did not know that it was difficult to achieve it by Easytrieve due to its limited functionality (read it from one of your posts).
Thanks again. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Papadi/Kolusu, from doco, I learnt that only 100 parse are supported. A programmatic approach would not have such limitation......pls correct me if I am wrong....thanks again. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
66 is less than 100. What problem does it give you? Current DFSORT has more PARSE fields, which you'd know if you'd followed up on Kolusu's comment on the subject.
What do you feel is Easytrieve Plus's "limited functionality"? No support for the DWIW and DWIM commands?
Can you explain, exactly, what the state of your requirement is. You have a SORT solution which will work for the record-length that you stated that you have. You have some Easytrieve Plus examples. Are you now happy, or what is it that makes you unhappy?
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Jan 22, 2014 11:56 am Post subject: Re: thanks
ranga_subham wrote:
Kolusu, thank you very much for SORT solution. I did not know that it was difficult to achieve it by Easytrieve due to its limited functionality (read it from one of your posts).
Thanks again.
ranga_subham,
Which post are you referring to? You have been given specific examples and you are still finding it difficult to complete the job you are given, when all you need is to just change the length of the string and the array to be searched? Wow!! Are you expecting us to give you fully tested code so that you can simply copy and paste it? Please lower your expectations if you think you can get complete code.
ranga_subham wrote:
Papadi/Kolusu, from doco, I learnt that only 100 parse are supported. A programmatic approach would not have such limitation......pls correct me if I am wrong....thanks again.
Lets be clear on something here. Your requirement of handling 66 occurrences fall within the existing limit of 100 for parse function. What is the problem here then? Secondly With DFSORT z/OS V2R1 which has been official released as of September 30 2013, You can now use up to 1000 parsed fields (%0-%999) with the PARSE function; the previous limit was 100 parsed fields (%0-%99). _________________ Kolusu
www.linkedin.com/in/kolusu
wow......its increased to 1000......great news....I will take some more time to finish my easytrieve progam and put it here..... try and error _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Jan 29, 2014 1:01 pm Post subject: Re: all I could do
ranga_subham wrote:
Kolusu, this is all I could do with my Easytrieve knowledge (learning though)
Not able to assign it to output (certainly something wrong ) but displayed it
Later, as a trial, added below piece of code and got S0C4 -
Kolusu, please help.
Thanks.
ranga_subham,
You need a PUT statement to write out to the OUTPUT, I don't see anything in regards to that and no wonder you cannot assign it to output.
You have an example code and yet you cannot adjust it to your requirements. *Sigh*
Here is an untested code.
Understand the code and know exactly how it is working, instead of simply copying it.
Code:
//SYSIN DD *
FILE INFILE
IN-KEY 01 007 A
IN-ARRAY 08 003 A OCCURS 132 INDEX IDX3
IN-DCG6 08 006 A OCCURS 066 INDEX IDX6
FILE OUTPUT FB(0 0)
O-REC 01 403 A
O-KEY 01 007 A
O-ARRAY 08 006 A OCCURS 66 INDEX ODX
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum