I need to check two conditions in one sysin card, I have to look for a specific value at a position and if it satisfies I have to sort fields from X posn and if that value is not found at that position I have to sort it from Y position.
E.g. - If I get '13274' or '22026' at posn 19 then I have to sort the file from 1st posn and if not found I have sort from 19th posn- Below is the card I have used but I am getting Duplicate Statement error.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
A bit of judicious searching on this site but not this forum will get you to a recent similar requirement, with a solution which may or may not work for you, but should get you started at least.
Other than the obvious repeat of the SORT instruction, one thing you do that is a good thing is that you seem to understand how sort works - INREC then SORT then OUTREC. Although it's not necessary to code that way by doing so things become clearer and you can see your errors when you make them - which is what we do for a living when you think about it.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
1) Please "Green Screen" it, and use the Code Tags to preserve spacing. In the Code tags, the enhancement of text doesn't work (like Bolding) but life's like that at times...
2) Not certain, but I have half a feeling that the TS was trying to read and sort one file with INREC and a second with OUTREC.