View previous topic :: View next topic
|
Author |
Message |
Bhuvanakp
New User
Joined: 29 Aug 2007 Posts: 19 Location: Chennai
|
|
|
|
Hi,
Requirement is to replace ß char with SS (Equivalent to German).
Here
>> FINDREP not supported by the system
>> ALTSEQ can't able to replace one char with two chars
>> Also we are not sure where this beta char exist in the input file.
Input:
1 2 3 4 5 6 7 8 9 ===> Approx. position
S T R A ß E <space> 5 <space>
Output:
1 2 3 4 5 6 7 8 9
S T R A S S E <space> 5 <DELETE this space since we have introduced extra char ( we replaced 1 char with 2 chars here) >
So kindly advise the sort card for this requirement. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Bhuvana,
Post your data using Code tags to make it readable and if you do so you wont have to type SPACE to indicate a SPACE. I dint get what you meant by "Approx position" above!!. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
what is the LRECL and RECFM ?
what happens when the match is the last byte ? where does the second S
go ?
can there be more then 1 match per record ?
Gerry |
|
Back to top |
|
|
Bhuvanakp
New User
Joined: 29 Aug 2007 Posts: 19 Location: Chennai
|
|
|
|
Thanks a lot . Please find the details:
1. LRECL = 1600 / RECFM =FB
2. Also the Beta character comes in first 1000 positions only n Iam sure that it does not come at the end of the record.
3. Beta character occurs many times in a record. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
So what happens to the last byte when your data got pushed right by one-byte |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why don't you use the accepted german abbreviation: Str.
for Straße
then you don't have to deal with shifting right and losing data. |
|
Back to top |
|
|
Bhuvanakp
New User
Joined: 29 Aug 2007 Posts: 19 Location: Chennai
|
|
|
|
Hi,
Kindly find the details:
1. My file record length is 1600 and Beta char exist only within 1000 positions and it does not exist at the end of the record.
2. The said Straße is an example data only in which ß character exists.
Could anybody please advise the fix for this requirement. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
One way would be to write the needed code. . . |
|
Back to top |
|
|
Bhuvanakp
New User
Joined: 29 Aug 2007 Posts: 19 Location: Chennai
|
|
|
|
Kindly advice the fix via sort card without FINDREP. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
As you have been a member here for more than 3 years, i believe you should already know that you need to provide which release of which sort product is being used. . .
You should also post what you have tried and what was the result.
Depending on how old your sort product, your organization may have to upgrade to something more current. FINDREP has been available for quite some time. If your sort product is far enough out of date, code may be necessary.
The good news is that this would be a trivial bit of code. |
|
Back to top |
|
|
Bhuvanakp
New User
Joined: 29 Aug 2007 Posts: 19 Location: Chennai
|
|
|
|
1. We are using Z/OS DFSORT V1R10.
2. Tried ALTSEQ to replace ß char with Spaces since ALTSEQ not supported.
SORT FIELDS=COPY
ALTSEQ CODE=(5940)
OUTREC FIELDS=(1,1600,TRAN=ALTSEQ)
where 59 - ß and
40 - space
But actually I need to replace ß char with 2 characters -> SS.
So please advise. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
As you've already realized, the DFSORT function you need is FINDREP. But you've said you don't have FINDREP, so you have two choices:
1) Have your System Programmer install the DFSORT PTF for FINDREP.
This PTF has been available since July, 2008 so it isn't exactly new. The newest DFSORT functional PTF is from Oct, 2010.
2) Don't use DFSORT for this task (that is, write a program).
Everything else here is just "noise". |
|
Back to top |
|
|
|