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

Display actual Binary values


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon May 19, 2008 8:50 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top