Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1188
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 the logon screen info o... sakthikumarT TSO/ISPF 4 Fri Dec 29, 2017 6:44 pm
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us