Posted: Wed Feb 13, 2019 6:46 pm Post subject: DFSORT 'FIELDS=' to have dynamic position and length
Hi,
This is my first post here. I have tried my best to follow the norms here. My apologies for any variations. Please let me know.
I have an input file as follows.
Column 2 - 4 - 3 digit number which is position of a string in the same record
Column 6 - 8 - 3 digit number which is length of the string in the same record
Is it possible to read the string of mentioned length from the position using SORT?
Originally this requirement coming from SMF records. But I have a simplified version of input file given below. Any help is much appreciated.
Joined: 26 Nov 2002 Posts: 12368 Topics: 75 Location: San Jose
Posted: Wed Feb 13, 2019 9:13 pm Post subject:
zebs,
Welcome to mvsforums. I just added code tags to your posts that the data is more readable and retains the spacing. Check this link which explains in detail about using code tags
Now coming to your problem I can show you way to get the desired results. But then I saw this
zebs wrote:
Originally this requirement coming from SMF records.
so I am guessing that you are planning to extract the triplets data based on offset in one of the field. You can still do that but would require generating dynamic control cards and has a limitation of how many control cards you can generate.
To give you an idea, here is JCL which will give you the desired results.
You can look at DFSMSG dd in the sysout and can see the generated dynamic control cards
search for ICE200I message( 2nd message) which shows IDENTIFIER FROM CALLING PROGRAM IS 0002
PS: Generating the dynamic control cards for SMF records is bit more complicated as you need to consider the RDW and build values dynamically.
Btw what type of SMF records are planning to implement this? SMF 30 or SMF 42 ? _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Thanks a lot for your reply. I will use the code tags for going forward.
It worked well at my end. I would like to reserve the idea of limiting the number of control cards and handling it using multiple steps as a last resort.
I am trying to extract triplets data based on offset from SMF 70 for this round.
I was considering a small routine at E61, to manipulate the control card. But I couldn't figure out anything to deal with OUTREC, using E61. Probably will need to handle entire INREC using an E15. Any suggestions or samples on that side will be a big hand.
I haven't come this far with SORT previously. So if it sounds silly, sorry about it.
Joined: 26 Nov 2002 Posts: 12368 Topics: 75 Location: San Jose
Posted: Thu Feb 14, 2019 12:26 pm Post subject:
zebs wrote:
I was considering a small routine at E61, to manipulate the control card. But I couldn't figure out anything to deal with OUTREC, using E61. Probably will need to handle entire INREC using an E15. Any suggestions or samples on that side will be a big hand.
zebs,
Not sure why you want to use an E61, as E61 exit is used to lengthen, shorten, or alter any control field within a record.
The control fields are specified in SORT/MERGE statement. Your extract is done using INREC/OUTREC or OUTFIL. Do you plan to sort/merge the triplet data? Ideally I would first COPY the desired contents and verify the contents before I SORT/MERGE them.
zebs wrote:
I am trying to extract triplets data based on offset from SMF 70 for this round.
RMF has it's own reports that it can generate from the SMF data. Did you check z/OS RMF Report Analysis manual?
Thanks for your help. I will look at the RMF manual. E61 was a wrong choice. I got some samples for E15 and trying to modify it the way I wanted, to handle the dynamic portion of the task. Hopefully that will solve my problem.
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