IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to change 2 byte binary to 3 byte character


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Dhanesh

New User


Joined: 07 Jul 2007
Posts: 4
Location: Bangalore

PostPosted: Tue Oct 16, 2007 1:41 pm
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:04 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:17 pm
Reply with quote

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
View user's profile Send private message
Dhanesh

New User


Joined: 07 Jul 2007
Posts: 4
Location: Bangalore

PostPosted: Tue Oct 16, 2007 3:30 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:32 pm
Reply with quote

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
View user's profile Send private message
Dhanesh

New User


Joined: 07 Jul 2007
Posts: 4
Location: Bangalore

PostPosted: Tue Oct 16, 2007 3:49 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:55 pm
Reply with quote

Dhanesh,

Quote:
BI,TO=CH ? Right?

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
View user's profile Send private message
Dhanesh

New User


Joined: 07 Jul 2007
Posts: 4
Location: Bangalore

PostPosted: Tue Oct 16, 2007 7:06 pm
Reply with quote

Thanks a lot Ekta & Murali.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 7:11 pm
Reply with quote

Quote:
Thanks a lot Ekta & Murali

You are welcome.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
Search our Forums:

Back to Top