Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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 Member


Joined: 29 Apr 2008
Posts: 609
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 Member


Joined: 29 Apr 2008
Posts: 609
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 Member


Joined: 29 Apr 2008
Posts: 609
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 File transfer issue with end of line ... VINAY PALLELA TSO/ISPF 4 Thu Nov 14, 2019 12:01 am
No new posts FTP - Special characters are converte... Chinnadu TSO/ISPF 1 Tue Nov 12, 2019 6:01 pm
No new posts Adding FIND to ISPF Panel display of ... Harold Barnes TSO/ISPF 3 Mon Oct 07, 2019 5:46 pm
No new posts Display current IMS region on an On-l... Time2Live IMS DB/DC 1 Fri May 03, 2019 1:59 am
No new posts Display Signed ZD field socker_dad DFSORT/ICETOOL 11 Thu Feb 28, 2019 1:17 am

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