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 resume binary ftp in z/os meykh2014 All Other Mainframe Topics 6 Sun Jan 22, 2017 10:01 am
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


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