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
 
Display actual Binary values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Mon May 19, 2008 2:22 pm    Post subject: Display actual Binary values
Reply with quote

Hi all,

I have following in file1

Code:

123
120
122
125


Now, my requirement is to convert it into equivallent binary and display the binary bits as following:

Code:

123  000100100011
120  000100100000
122  000100100010
125  000100100101



Hope I am clear with the equirement.


Thanks in advance.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon May 19, 2008 8:50 pm    Post subject:
Reply with quote

Assuming you only have to convert '0'-'9', you can use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=...  output file (FB
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(6:1,1,CHANGE=(4,C'0',C'0000',C'1',C'0001',
    C'2',C'0010',C'3',C'0011',C'4',C'0100',C'5',C'0101',
    C'6',C'0110',C'7',C'0111',C'8',C'1000',C'9',C'1001'),
   10:2,1,CHANGE=(4,C'0',C'0000',C'1',C'0001',
    C'2',C'0010',C'3',C'0011',C'4',C'0100',C'5',C'0101',
    C'6',C'0110',C'7',C'0111',C'8',C'1000',C'9',C'1001'),
   14:3,1,CHANGE=(4,C'0',C'0000',C'1',C'0001',
    C'2',C'0010',C'3',C'0011',C'4',C'0100',C'5',C'0101',
    C'6',C'0110',C'7',C'0111',C'8',C'1000',C'9',C'1001'))
/*
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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

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