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
 
Binary to display characters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Roy Ware

New User


Joined: 19 Sep 2013
Posts: 14
Location: USA

PostPosted: Tue Sep 19, 2017 8:46 pm    Post subject: Binary to display characters
Reply with quote

Another odd question!

I want to take a 4 byte binary field and convert it into a text field of 8 bytes with each zone and digit as a character. For example, for input I have:

Code:
7DEB
2A9C

and would like to see the output as
Code:
72DAE9BC


Can this be done in SyncSort?
Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 189
Location: Maryland

PostPosted: Tue Sep 19, 2017 10:52 pm    Post subject:
Reply with quote

This is not "display as a character", but "display as a hexadecimal".

Not in SYNCSORT (and other SORTs, too)
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 189
Location: Maryland

PostPosted: Wed Sep 20, 2017 9:17 pm    Post subject:
Reply with quote

Not tested: try to use parameter of OUTREC/OUTFIL:

Code:
 ... BUILD=(...,p,l,TRAN=HEX,...)


If it works OK, let us know, too.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 189
Location: Maryland

PostPosted: Wed Sep 20, 2017 9:46 pm    Post subject:
Reply with quote

Yes, it works
Code:
//TRANHEX  EXEC PGM=SYNCSORT 
//*                           
//SYSOUT    DD  SYSOUT=*     
//SORTIN   DD  *             
123456789                     
ABCDEFGHIJKLMNOPQRSTUVWXYZ   
abcdefghijklmnopqrstuvwxyz   
//*                           
//SORTOUT  DD  SYSOUT=*       
//*                           
//SYSIN    DD *               
  SORT FIELDS=COPY           
  OUTREC FIELDS=(1,26,HEX)   
  END                         
//*                           

Result:
Code:
----+----1----+----2----+----3----+----4----+----5--
F1F2F3F4F5F6F7F8F94040404040404040404040404040404040
C1C2C3C4C5C6C7C8C9D1D2D3D4D5D6D7D8D9E2E3E4E5E6E7E8E9
818283848586878889919293949596979899A2A3A4A5A6A7A8A9
******************************** Bottom of Data ****
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
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 DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts Display upon console bipinpeter COBOL Programming 1 Thu Jun 22, 2017 12:35 am

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