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
 

 

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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm


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