I am trying to pivot the data from multiple fields and then I am sorting them. The sort works fine but it gives some unwanted character on the same line.
Let me explain further. I have an input file which has three fields.
NAME1 from 1 to 30
NAME2 from 31 to 70
NAME3 from 71 to 130.
I use the below JCL step to sort the data from the input file and then merge it into a single field of length 100.
EDIT Z930028.SPLIT.NAMES.TEMP Columns 00001 00072
****** ***************************** Top of Data *****************************
==MSG> -CAUTION- Data contains invalid (non-display) characters. Use command
==MSG> ===> FIND P'.' to position cursor to these
000001 FIRSTNAME1 156
000002 FIRSTNAME10
000003 FIRSTNAME100
000004 FIRSTNAME1000 ME158
000005 FIRSTNAME10000
000006 FIRSTNAME1001
000007 FIRSTNAME1002 E160
000008 FIRSTNAME1003
I was not expecting to see 156, ME158 etc on the records. I do not have any record in the input as
FIRSTNAME1 156
I get this issue when the records in the input file are more than 9K. Even after running the JCL multiple times, I always get the same result.
Could any one suggest, what I can do to avoid the extra data in the output.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Since I don't know what your input records look like, it's difficult to say what's happening. I ran something like what you said you had and didn't get the result you got.
One thing I noticed is that you're building a 60-byte record with the COPY operator, but then you're using LRECL=100 for the SELECT output. You might try changing your OUTFIL statement to the following so the two output LRECLs match:
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
sudhirk63 wrote:
EDIT Z930028.SPLIT.NAMES.TEMP Columns 00001 00072
****** ***************************** Top of Data *****************************
==MSG> -CAUTION- Data contains invalid (non-display) characters. Use command
==MSG> ===> FIND P'.' to position cursor to these
000001 FIRSTNAME1 156
000002 FIRSTNAME10
000003 FIRSTNAME100
000004 FIRSTNAME1000 ME158
000005 FIRSTNAME10000
000006 FIRSTNAME1001
000007 FIRSTNAME1002 E160
000008 FIRSTNAME1003
Sudhir,
Didn't you notice that what you posted did not look anything like what you intended?
You did preview it first, didn't you?
What you intended was this:
Code:
==MSG> -CAUTION- Data contains invalid (non-display) characters. Use command
==MSG> ===> FIND P'.' to position cursor to these
000001 FIRSTNAME1 156
000002 FIRSTNAME10
000003 FIRSTNAME100
000004 FIRSTNAME1000 ME158
000005 FIRSTNAME10000
000006 FIRSTNAME1001
000007 FIRSTNAME1002 E160
000008 FIRSTNAME1003
.......0000000001111111111222222222233333333334444444444555555555566666666667
.......1234567890123456789012345678901234567890123456789012345678901234567890
(I added the column counts)
Next time post 'code' with the code tags........
Looks like Franks solution should work, getting rid of the possibility of garbage in undefined portions of the output record......