View previous topic :: View next topic
|
Author |
Message |
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
Hi Experts,
My input file is FB. LRECL is 95
Pos 1 to 8 is Date - Length 8 bytes
Pos 11 to 54 is file name - Length 45 bytes
Below is the input file having correct records and Redundant (unwanted records which truncated) - Showing only file name field
Code: |
CA7TRIG.SYSTEM.FROMLPAR.NDM.TOOOLPAR
CA7TRIG.SYST ----> Redundant
CA7TRIG.SYSTEM. ----> Redundant
CA7TRIG.SYSTEM.FROMLPAR.NDM.TOOOL ----> Redundant
CA7TRI ----> Redundant
CA7TRIG. ----> Redundant
WC ----> Redundant
SYSTEM.N ----> Redundant
SYSTEM.APP.PARMLIB(MEMBER)
SYS ----> Redundant
SYSTEM.SECNQUAL.KL.YOU.UPDATE.PERSON.FRMTD(+1)
SOAP.NDM.UNIT.YOU.FELT.PHON.BKP.G0928V00
STOR.NDM.UNIT.YOU.FELT.PHON.BKP ----> Redundant
STOR.NDM.UNIT.YOU ----> Redundant
STOR.NDM.UNIT ----> Redundant
PING.UNIT.HH.LOAD.GROUPING(0)" ----> Redundant
STOR.NDM.UNI ----> Redundant
SYSTEM.SECNQUAL. ----> Redundant
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ----> full spaces
w ----> Redundant
c ----> Redundant
*.NULL ----> Redundant
JHKI.NDM.SYS.DELTA.MANHOP( ----> Redundant
/hubunit/ ----> Redundant
SYSTEM.NDM.UNIT.THEW.BUS.CTA(+1), ----> Redundant
SYSTEM.NDM.UNIT.THEW.BUS.CTA(+1)
SYSTEM.NDM.SYS.FULL.FIELD(+1)
|
But, i need only the correct records in the output file as below: Showing only file name field
Code: |
CA7TRIG.SYSTEM.FROMLPAR.NDM.TOOOLPAR
SYSTEM.APP.PARMLIB(MEMBER)
SYSTEM.SECNQUAL.KL.YOU.UPDATE.PERSON.FRMTD(+1)
SOAP.NDM.UNIT.YOU.FELT.PHON.BKP.G0928V00
SYSTEM.NDM.UNIT.THEW.BUS.CTA(+1)
SYSTEM.NDM.SYS.FULL.FIELD(+1)
|
Right now, i am simply eliminating (exclude) these records
by specifying this redundant records in the sort card...directly.
But it should be Generic like...
for example
if a file name ends with . (dot) we should eliminate that record.
Code: |
CA7TRIG.SYSTEM.
CA7TRIG.
SYSTEM.SECNQUAL.
|
My only concern is how to specify these records generic instead of specific (directly given all these unwanted records in the sort card and eliminate)
Is there any possibility of not specifying dirctly??
Thanks in advance. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
why 'CA7TRI' and 'CA7TRIG.SYST' are redundant? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
because the TS knows
but a SS looking for a ". " might get rid of some of them |
|
Back to top |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
gylbharat
Actually those are reduntant records.
As i already mentioned
'CA7TRI' , 'CA7TRIG.SYST' etc. are all truncated records populated tin the file.
enrico,
Great Thanks for your suggestion.
I took some sample records in my input file.
I try to remove the first record in the below file.
Code: |
DATEFILD CA7TRIG.SYSTEM.
DATEFILD CA7TRIG.SYSTEM.FROMLPAR.NDM.TOOOLPAR
DATEFILD SOAP.NDM.UNIT.YOU.FELT.PHON.BKP.G0928V00
|
Using the sort card
Code: |
SORT FIELDS=COPY
OMIT COND=(11,45,SS,EQ,C'.')
|
But its removing all the three records , which is wrong.
is there anyother way to achive this?
thanks. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
in this case You forgot the blank after the dot
should be '. ' not '.'
but for the other cases it looks a bit more difficult
we have noooo way of telling that
Quote: |
CA7TRIG.SYST
CA7TRIG.SYSTEM.FROMLPAR.NDM.TOOOL
SYSTEM.N |
do not satisfy the requirement for a dataset name
the only way at this point is to write a rexx script
to check the existance of each dataset and proceed accordingly |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
Quote: |
Pos 11 to 54 is file name - Length 45 bytes
|
length is 44 bytes not 45 bytes.
Gerry |
|
Back to top |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
enrico,
Great Thanks.
Yes, We can remove those records with '. ' (blank after .)
Sorry, i forgot to include that blank.
There are some records having " in it. We can also remove this using 'SS'
But for other type of records really i dont have any clue.
As you suggested, I will try to write some REXX code.
But if anyone has somemore idea regarding this, Please kindly
share your ideas.
It would be very helpful for me.
Thanks,
Gerry,
Yes, you are correct. It is 44 bytes, not 45.
Thanks for pointing out my mistake. |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
Try to come up with proper selection criteria to select records as redundant, otherwise no programming language can help you apart from reviewing and removing it manually. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
the include/exclude criteria are clear...
the TS wants to keep only EXISTING datasets
that' the reason why no utility will be able to do it
the only thing that a general purpose utility can do is pattern matching
but that, as already said, does not satisfy the requirement
the only thing that needs revisiting is the relative gdg stuff !
it is not clear the <goodness> criteria why (+1) is good and (0) is bad
apart that it can be done quite easily |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
Quote: |
the TS wants to keep only EXISTING datasets |
My bad, i dint notice it... Thanks Enrico.
This being the case, REXX is the best option as you suggested. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Everything says rexx.
Maybe you don't even need to check for the existence of the dataset (your choice), just that the format is valid.
You could include code to exclude the valid-looking datasets that you do not want (whether or not they exist). |
|
Back to top |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
Hi experts,
Thanks for each and everyone, Spending your valuable time.
Regarding my doubt,
We found some issues in the Sortcard that creates
my final Output file (which is having this truncated or Redundant records)
We put a fix by including all the Possible conditions that not to
truncate the dataset names.
Now we are able to get the final file with all correct file names populated.
Again thanks for everyone.
Moderator,
kindly, Can you please lock this thread. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Can you post the solution... |
|
Back to top |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
gylbharat wrote: |
Can you post the solution... |
gylbharat,
Its very internal to our process, Just included some Sort conditions and we did this....
Our main aim is, in our final file... the dataset names..should not get truncated (of course the input file is SAR unload file) |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
Its very internal to our process, Just included some Sort conditions and we did this.. |
..
if the solution is very internal to Your process
You should have refrained from wasting people' s time on a public forum
asking for help, receiving it and not sharing the final solution is just plain stupid
and don' t You dare to reply with some even more stupid excuse... YOU ARE WARNED ! |
|
Back to top |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
Mr. Enrico,
I respect your words....
No one scolded me like this ever.....
I am with this forum for nearly two and half a year...
Sincerely, i know the rules of posting a question seeking for help.
How can i waste other peoples valuable time....( i will never do that )
I asked for a help, Got some suggestions (Rexx), but during working on it we found simple approach (instead of eliminating / filtering the redundant records we can stop populating this redundant records)
what i said to gylbharat is , we just used exclude and include conditions in the SAR unload file (input file) to keep in mind that, we should not get any truncated data.....just simple include/exclude/split/build keywords ( this is what i said about internal process ).
More....
Earlier we received this final file from other system with lot of truncated datas, so we thought we can go for some REXX to eliminate this redundant records.
But after we analyzed the original input file, we ourselves took some time to incorporate this.
I am explaining everything in detail in order to prove , nothing is wrong from my side.
If anyone feels, anything is wrong on my side, Please you can give warning.
I will take care about this in my future postings, that this should not happen.
sincere apologies to each and everyone who replied to this thread. |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
Hi Karthik,
You gave us the edited input file and why don't you show us the card which can be used to achieve the edited output you have posted.
We are not asking you the confidential information which could impact your business.
Note:Everyone is here to share their valuable learnings. So what you learnt with this scenario might help others. |
|
Back to top |
|
|
|