View previous topic :: View next topic
|
Author |
Message |
vrexy
New User
Joined: 19 May 2005 Posts: 7 Location: bangalore
|
|
|
|
Hi,
I have a file of length 550 and need to replace 220th position which is a character with numeric .I used below code to execute,but its throwing error.
Code: |
SORT FIELDS=COPY
OUTFIL OUTREC=(550,1,
CHANGE=(220,C'M',C'1',
C'W',C'2',
C'S',C'3',
C'D',C'4'),
NOMATCH=(C'G'))
|
I tested for changing numeric to numeric by specifying ''C''and its working fine.
EX: C'1',C'0'
I think the problem is with data type(C OR X OR PD..) which we need to declare correctly!
Can any body throw some light on the above issue to resolve?
Cheers,
rexy. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I used below code to execute,but its throwing error. |
When you say something like this, you need to show the exact error message you received.
In this case, given that your syntax is wrong in several ways, you could have gotten any one of a number of errors. You have:
Code: |
OUTFIL OUTREC=(550,1,
CHANGE=(220,C'M',C'1',
C'W',C'2',
C'S',C'3',
C'D',C'4'),
NOMATCH=(C'G'))
|
What this syntax says is that if the byte at 550 is 'M', change 220 bytes starting at 550 to '1', etc. Obviously, that's not what you want to do.
If you want to replace the byte at 220, you could use this syntax with DFSORT:
Code: |
OUTFIL OVERLAY=(220:220,1,
CHANGE=(1,C'M',C'1',
C'W',C'2',
C'S',C'3',
C'D',C'4'),
NOMATCH=(C'G'))
|
|
|
Back to top |
|
|
vrexy
New User
Joined: 19 May 2005 Posts: 7 Location: bangalore
|
|
|
|
Quote: |
If you want to replace the byte at 220, you could use this syntax with DFSORT:
Code: |
OUTFIL OVERLAY=(220:220,1,
CHANGE=(1,C'M',C'1',
C'W',C'2',
C'S',C'3',
C'D',C'4'),
NOMATCH=(C'G'))
|
|
Hi,
The above code is also throwing SYNTAX error.Is the above code supprots for SYNCSORT??
Cheers,
rexy. |
|
Back to top |
|
|
vrexy
New User
Joined: 19 May 2005 Posts: 7 Location: bangalore
|
|
|
|
Hi,
I did it thru FILE-AID replace and its working fine. Thankyou for promt reply.
$$DD01 COPY REPL=(220,EQ,C'M',220,C'1'),
REPL=(220,EQ,C'H',220,C'2'),
REPL=(220,EQ,C'W',220,C'3'),
REPL=(220,EQ,C'S',220,C'4'),
REPL=(220,EQ,C'D',220,C'5')
Cheers,
rexy. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
The above code is also throwing SYNTAX error.Is the above code supprots for SYNCSORT?? |
The code works fine with DFSORT. It does NOT work with Syncsort because Syncsort does not support OVERLAY. |
|
Back to top |
|
|
|
|