Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
star_dhruv2000

Active User


Joined: 03 Nov 2006
Posts: 76
Location: India

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
References
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 4621
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1