Check the file sorted or not!



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Check the file sorted or not!

Postby dick scherrer » Wed Dec 19, 2012 3:35 am

Hello and welcome to the forum,

No one here minds that you are a beginner - indeed, beginners/students are the reason this forum exists.

We do mind when someone asks the forum to do their work for them. We are most willing to help, but Not do your (home)work for you.

we can do it by reading the file, like for example we will read 1st record and then we will compare it with the other next records, if the 1st record is greater then the next record then we will display 'records are not in ascending order' or viceversa.
You have just "written" the program. Now, all you have to do is convert this to COBOL syntax.

When you get stuck, post what you have tried and what needs clarification.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Check the file sorted or not!

Postby BillyBoyo » Wed Dec 19, 2012 6:24 pm

If, as abatch job you want to check a file is in sequence, use MERGE with one input file, specifying the desired key. The job will fail if not in sequence.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post