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
 

 

Changing Numeric value in to Hex Value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Hari Kumar

New User


Joined: 28 Jul 2005
Posts: 19

PostPosted: Fri Dec 22, 2006 11:20 am    Post subject: Changing Numeric value in to Hex Value
Reply with quote

Hi,

I have one input with first two char as numeric value.

INPUT

00AAAA
01BBBB
02VVVV
12AAAA

O/p file should contain only in below mentioned format

OUTPUT

F000AAAA [ First two chars changed from numeric to Hex value]
F001BBBB
F002VVVV
F1F2AAAA

Basically the first 2 chars in a file needs to be changed to the hex value.


Please provide sysin card for this.
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Fri Dec 22, 2006 11:42 am    Post subject:
Reply with quote

Hi there,

Please find the attached sysin card . I assumed that record length of i/p file is 80 bytes

Code:
OPTION COPY             
  OUTFIL OUTREC=(1:1,2,HEX,
  5:3,78)   
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: Fri Dec 22, 2006 9:20 pm    Post subject:
Reply with quote

Hari,

Ekta's DFSORT statements will do what you asked for. But you have the output wrong. It will be:

Code:

F0F0AAAA 
F0F1BBBB 
F0F2VVVV 
F1F2AAAA 
Back to top
View user's profile Send private message
Hari Kumar

New User


Joined: 28 Jul 2005
Posts: 19

PostPosted: Fri Dec 29, 2006 3:09 pm    Post subject:
Reply with quote

Its working. Thanks a lot and happy new year wishes
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 Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am
No new posts Problems in File-Aid / DB2 Spufi whil... amitc23 CLIST & REXX 6 Fri Feb 12, 2016 1:59 pm


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