Page 1 of 1

DELETE RECORDS GREATER THAN LRECL=15000

PostPosted: Wed Apr 04, 2012 9:24 pm
by xboss
I have a requirements to delete records greater than LRECL=15000 in a File.
If this is possible, can anybody please show me the way which manual I should be following. Sorry if I post this under wrong topic because I am not sure if the topic falls under DFSORT/ICETOOL/ICEGENER or there is any other utility to do this.

Re: DELETE RECORDS GREATER THAN LRECL=15000

PostPosted: Wed Apr 04, 2012 9:43 pm
by BillyBoyo
You could try something like this:

  OPTION COPY
  OMIT COND=(1,2,BI,GT,+15000)



EDIT: Change to GT :-)

Second EDIT: Do you mean 15000 bytes of data, + RDW, or 14996 bytes of data + RDW?

Re: DELETE RECORDS GREATER THAN LRECL=15000

PostPosted: Wed Apr 04, 2012 10:22 pm
by Frank Yaeger
I have a requirements to delete records greater than LRECL=15000 in a File.


As stated, this question makes no sense.

For a RECFM=FB file, LRECL=15000 means that each record is exactly 15000 bytes so you can't have a record greater than LRECL=15000.

For a RECFM=VB file, LRECL=15000 means that the maximum record in the file can only be 15000 bytes so you can't have a record greater than LRECL=15000.

Now if you really mean that you have a RECFM=VB file with an LRECL>15000 and you want to delete records with an RDW length>15000, you can do that
with the DFSORT OMIT statement BillyBoyo gave you. If you mean something else, then you have to explain more clearly what it is you want to do. An example of input records and expected output records would help.

Re: DELETE RECORDS GREATER THAN LRECL=15000

PostPosted: Thu Apr 05, 2012 2:07 am
by xboss
Billy showed me the exact direction I was asking for. Thanks Billy.

Frank,
Sorry for my bad wording, but I got my answer.

Re: DELETE RECORDS GREATER THAN LRECL=15000

PostPosted: Thu Apr 05, 2012 2:08 am
by Frank Yaeger
Luckily for you, Billy answered the question based on what you meant, not what you said. :D

Re: DELETE RECORDS GREATER THAN LRECL=15000

PostPosted: Thu Apr 05, 2012 3:57 am
by BillyBoyo
You're right Frank, and it is a good point.

In this business we communicate complexity amongst ourselves, the somewhat arcane which we understand successfully because both parties know what they mean.

The wheels may fall off as soon as fewer than both parties are using the same words but not talking about the same thing.

Usually there are either obvious inconsistencies, or at least little hints, and we seek clarification from the other party and avoid the looming problem, big or small.

I "guessed" at what you meant, since otherwise what you were saying seemed nonsense. Even then I wasn't sure, since I was guessing, whether you were including the RDW or not. Problem with that approach, you might be talking nonsense but my guess at what you want can still be wrong.

If all that isn't bad enough, we then talk to business people, with their own terminology. If we aren't careful with our terminology, we don't stand much of a chance with theirs. Never be afraid to ask someone exactly what they mean, even if everyone else in the room thinks (or pretends) they know what it means. Never use terminology you don't fully understand. Use words, as many as you need.