Making OMIT command inactive after a some count

5 pts.
Tags:
JCL
Job Control Language
OMIT statement
SORT statement
I have to write a JCL step in which I have to copy a file in to another file after omitting ONLY 5 records in which starting 4 position are having character 1644. Can you please help? Thanks in advance, Sushant Sharma

Answer Wiki

Thanks. We'll let you know when a new response is added.

It seems that you saying that there are more than 5 records with this value and you want to omit 5.

This is pretty clumsy …
Get the record number where you want to change from the omit you could
-issue a copy up to that record number with the omit rule and replace the member
then
– issue a copy starting after that record number without the omit rule and add to the member.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Dhanson
    I think the best way to do this would be to sort the file putting the records with 1644 in positions 1-4. Then you can use the SKIPREC and skip the first 5 records. Or, you could create two files one without 1644 in positions 104, and another with records have 1644 in positions 1-4. Then use SKIPREC to skip the first 5 records with 1644 in positions 1-4. Then merge the two files together.
    20 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following