View previous topic :: View next topic
|
Author |
Message |
Dhanesh
New User
Joined: 07 Jul 2007 Posts: 4 Location: Bangalore
|
|
|
|
I want to change a 2 byte binary into 3 byte characteristics
which is in the first position in the input record.
the rest of the record needs to remain the same.
Thanks & Regards,
Dhanesh js |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
Please use following sort card
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1:C'ABC',3,77) |
change ABC To whatever u want to put on first 3 byte. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Ekta,
OP says conversion from BI to CH, copying the rest of the record as it is.
Your sortcard, doesn't show the require conversion. |
|
Back to top |
|
|
Dhanesh
New User
Joined: 07 Jul 2007 Posts: 4 Location: Bangalore
|
|
|
|
hi murali,
so can you tell me what will be the statements used
if we want to use OP
Thanks & Regards
Dhanesh |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Dhanesh,
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,2,BI,TO=ZD,LENGTH=3,
3,n)
/* |
Replace 'n' above with your (lrecl-2) value. |
|
Back to top |
|
|
Dhanesh
New User
Joined: 07 Jul 2007 Posts: 4 Location: Bangalore
|
|
|
|
hi murali,
BI,TO=CH ? Right?
also i want to the copy the whole rest part of the record from input file to the output file
so if my input file lrecl is 121 bytes
and output files lrecl will be 122 bytes
so in (3,n) n must be equal to 119 ? which is 2 bytes - 121 of input file.
or
n must be equal to 122 ?
Hopefully i am not confusing you ....
Thanks & Regards,
Dhanesh js |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Dhanesh,
BI & CH are incompatible formats. Use ZD.
Quote: |
so if my input file lrecl is 121 bytes
and output files lrecl will be 122 bytes |
Yes.
Quote: |
so in (3,n) n must be equal to 119 |
119 os correct.
Quote: |
Hopefully i am not confusing you .... |
you are not. |
|
Back to top |
|
|
Dhanesh
New User
Joined: 07 Jul 2007 Posts: 4 Location: Bangalore
|
|
|
|
Thanks a lot Ekta & Murali. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Quote: |
Thanks a lot Ekta & Murali |
You are welcome. |
|
Back to top |
|
|
|