|
|
| Author |
Message |
sudhirk63
New User
Joined: 08 Oct 2006 Posts: 19 Location: Bangalore
|
|
|
|
Hello All,
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.
//RUN001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DISP=SHR,DSN=Z930028.NAMEXREF.TEST.INPUT
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE),DISP=(,DELETE)
//OUT DD DSN=Z930028.SPLIT.NAMES.TEMP,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE),
// DCB=(LRECL=100,BLKSIZE=0,RECFM=FB,DSORG=PS)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
SELECT FROM(T1) TO(OUT) ON(1,60,CH) FIRST
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OUTREC=(1,30,/,31,40,/,71,60)
/*
And in the output I get as
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.
Thanks.
Sudhir |
|
| Back to top |
|
 |
References
|
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1199 Location: At my desk
|
|
|
|
| Have you dumped/displayed the original input to see if the unexpected output is actually in the input? |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4607 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:
| Code: |
OUTFIL FNAMES=T1,OUTREC=(1,30,100:X,/,31,40,/,71,60)
|
I don't know if that has anything to do with what you're seeing, but it's worth a try.
If that's not it, then I agree with CICS guy that you should take a look at your input records.
I'd need to see your DFSMSG output and have some idea of what's actually in your input records to help you any more with this. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 2977 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...... |
|
| Back to top |
|
 |
sudhirk63
New User
Joined: 08 Oct 2006 Posts: 19 Location: Bangalore
|
|
|
|
| Thanks Frank , your solution worked. |
|
| Back to top |
|
 |
|
|
|