Joined: 24 Jul 2011 Posts: 651 Location: Down on the pig farm
Posted: Thu Sep 04, 2014 11:35 pm Post subject:
Of course you can post some code - you can change anything that could identify your customer by using made up names and data. Without the code we have no real idea of what you are doing. _________________ Regards
I'm trying to read in an input file. Ill read the input file, and be looking for duplicate values, in the input file, of what the current pointer is. Ill read it with a current, previous, and next pointer, like a linked list. Then keep doing this until I've read the whole file.
However, I cant use JCL or a sort. i have to use the start statement
This is what im trying to do:
Perform until eof
Move 1000 to current-pointer
Start input-file less than current-pointer
Start input-file equal to current-pointer
If previous-pointer or next-pointer equal to current-pointer
display "copy found"
This is very confusing. You can only use START on a VSAM KSDS (which can have no duplicate keys) or on a VSAM Alternate Index file.
Never, and I repeat, NEVER, read the same record more than once. Your program will run like a dog with no legs.
If you are not reading an Alternate Index, forget START. If you are, tell us.
If you are reading an ordinary file, is it in key order? If it is, it is easy, you just read, store the key, read the next record, compare to the stored key, continue until end.
If it is not in key order, put it in key order. If for some really, really weird reason you are unable to use an external SORT (with which you can already identify duplicate keys anyway) then use the COBOL SORT verb to sort the file internally, then proceed as above. If you are not allowed to do even that, then you have to code your own sort and proceed as above.
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