Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Code:
OUTFIL FNAMES=01
'FNAMES' goes with ddnames used in the JCL whereas OUTFIL 'FILES' go with JCL dd suffixes such as '01' or '02' or '03'. And your ddnames in the JCL should be consistent with these.
I would not recommend the latter if you have SORTOFnn DDs because that is the whole purpose of having "FILES=nn"
While we wait for the complete SYSOUT messages, it might be worth verifying this in your JCL and control statements.
Also your control statements look for XXX,YYY OR ZZZ at position-25 to route to each output file, but in the sample input shown there is only ZZZ.
Can you also include a sample input representative enough to have data written into all the output files?
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Did you read my previous post? It might not help if you do not post the relevant sysout messages and the JCL. When I ran your control statements as is, I am getting other syntax errors that do no appear in the SYSOUT from your last post.
Arun, the SORT FIELDS=COPY is missing in the control card which I pasted in my earlier post.
The sample input file has records with XXX, YYY and ZZZ, I'm not sure what is missing there. I think this could be with the spaces as I've copied the text from notepad.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
The sample input file has records with XXX, YYY and ZZZ
You're right. I was looking at pos-1 instead, my bad. I got errors with the FNAMES=01. Was wondering how it worked for you. Can you show your JCL DDnames?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Trinadh,
I know you are capable with SORT, and usually work with SyncSORT.
Now you come here "unable to show the SYSOUT", with FNAMES= which gives a syntax error (and masses of other errors subsequent to that) and continue to insist that the error-marker points to the 30:.
Can you at least post the entire ICE201I messge, or if not, the first non-blank character after the message-number?
Did you read Rohit's post about the "1:C'"?
What's going on?
You are going to have to make that change on INREC or OUTREC.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Again, in either INREC or OUTREC you are going to have to use IFTHEN=(WHEN=(logicalcondition) to make the changes where you want to change other than overlaying COUNT or TOTAL on TRLUPD. Or, if you can otherwise recreate the trailer, drop the original and use TRAILER1 to create a new one.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Rahul, there were multiple issues as you might have noticed already - the attempt of overlaying a constant in TRLUPD subparameter, and the usage of FNAMES instead of FILES. And it took several posts to show what was actually tried. At least in his last post he did that.
The OP seems to have solved the FNAMES error, and for the other main problem, Bill has made a clear suggestion but am not sure if it came to the OP's notice. Lets hope if he tries something based on that, and comes up with something.
Another option is to build a new trailer using TRAILER1 in the OUTFIL omitting the existing trailer (assuming other fields are the constants shown in the example) instead of updating the existing trailer using IFTRAIL
EDIT: I think by the time I made this post, 2 other posts came in. Bill-Sorry abt that.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Has someone hijacked your account, or your name? I suppose if someone has, they're hardly going to say "yes". Or, I'm beginning to believe, I have been mislead by "3NADH" into thinking you are someone else :-)
Anyway. Sort control cards can't start in column one.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
I tried INREC IFTHEN too and facing the same error codes
One of the suggestions made earlier was to have a separate INREC/OUTREC (and this can occur only once per control card), so you cannot embed this into each of your OUTFIL groups.
I've given the sort control cards from position 2 only. I think this is a problem with my editor, as I'm coding it here directly instead of pasting the content.
The $ sign is showing at OVERLAY statement.
I'm sure that the error is causing due to the multiple OUTRECS coded in each OUTFIL.
When I removed the OUTREC in OUTFIL FILES =02 and 03, it is working fine.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
When I removed the OUTREC in OUTFIL FILES =02 and 03, it is working fine
Are you sure, it is giving you the expected results? If it does not, then it IS NOT 'working fine'.
If you are ok to build a new trailer, and skip the original trailer, this might help, and maybe easier to understand. This is the alternative explained earlier in this thread.
Also I tried the below code and couldn't get the perfect count in the trailer record after the file split. Assume my input file has 90 records and each split may contain 30 records. The below sort is throwing (no it isn't - it is showing a) record count of 100 in the trailer record in all the three split files.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Well, no you didn't. OUTREC is a parameter on OUTFIL, is what you discovered in the example. This is entirely different from... OUTREC. Note the comma indicating a continuation. All that OUTREC on OUTFIL is, is BUILD.