Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to change 2 byte binary to 3 byte character

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need to change 2 byte binary to 3 byte character
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: 1187
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:04 pm    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:17 pm    Post subject:
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    Post subject: Reply to: Need to change 2 byte binary to 3 byte character
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: 1439
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:32 pm    Post subject:
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    Post subject: Reply to: Need to change 2 byte binary to 3 byte character
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: 1439
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:55 pm    Post subject:
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    Post subject: Reply to: Need to change 2 byte binary to 3 byte character
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: 1439
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 7:11 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts resume binary ftp in z/os meykh2014 All Other Mainframe Topics 6 Sun Jan 22, 2017 10:01 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us