Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Error :- RECORD TYPE IS F - DATA STARTS IN POSITION 1
I have tried various options..It's giving me the same error....
Huh? What makes you think that's an error? The message id is ICE201I which means it's an informational message. An error message would have an A at the end rather than an I.
I ran the equivalent of your job with DFSORT and got cc=0 - no errors.
If you're getting cc=16, then there would be an ICExxxA message for the actual error.
Note also that you only need one blank, not ten blanks, for the first CHANGE constant - DFSORT pads with blanks on the right to the specified length of 10.
how can I change the above sort it to INREC...since I need the sort to take place after the change.The Include has fields of O/p file
I don't understand what you're asking, but maybe this will answer your question anyway. (If not, explain in more detail what you want to do.)
If you want to include the records before they are sorted, use the INCLUDE statement. If you want to include the records after they are sorted, use the INCLUDE parameter of the OUTFIL statement.
If you want to make changes to the records before you sort them, use INREC. If you want to make changes to the records after you sort them, use OUTREC or OUTFIL.
For example: to sort, then change the sorted records, and then include on the changed records, use:
Frank Please clear my doubt asap......I've already tested the same thing and it's working fine....But this is a production issue and I need ur confirmation.....
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Yes, your statements will do what you said. Personally, I would rearrange it like this as a visual aid to the order in which the statements are executed (although you don't have to):
Code:
INCLUDE COND=(108,2,CH,EQ,C'GB',AND,12,10,CH,NE,22,10,CH)
INREC FIELDS=(1:1,7,8:12,10,18:32,1,
CHANGE=(10,C'?',C'9999-12-31'),
NOMATCH=(22,10),28:32,1,29:108,2)
SORT FIELDS=(1,7,PD,A,8,10,CH,A,18,10,CH,A)