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
 

 

How to edit hexa value in the file

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

New User


Joined: 14 Oct 2007
Posts: 29
Location: Bangalore

PostPosted: Wed Sep 28, 2011 2:46 pm    Post subject: How to edit hexa value in the file
Reply with quote

Hi

I have a requirement like below;
In my file first 4 bytes having hexa value. I have checked in the file hexa value i am able to see some nuber. Till the end of records there is some sequence numbers. But i want to edit that seqence number from 1 to till end of file. could you please help me on this.

Thanks
JMR
Back to top
View user's profile Send private message

gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Sep 28, 2011 3:10 pm    Post subject:
Reply with quote

open the file in edit mode...

Type 'HEX ON' then edit the numbers.
Back to top
View user's profile Send private message
jmreddymca
Warnings : 1

New User


Joined: 14 Oct 2007
Posts: 29
Location: Bangalore

PostPosted: Wed Sep 28, 2011 3:20 pm    Post subject:
Reply with quote

sorry my file is having lacs of records
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Sep 28, 2011 3:56 pm    Post subject:
Reply with quote

jmreddymca wrote:
sorry my file is having lacs of records


Provide below information:

LRECL RECFM of the input file,

Sort product installed at your shop

Show some sample records.
And expected output ( show hex values for sequence number you want in output)
(Use code tags)
Back to top
View user's profile Send private message
jmreddymca
Warnings : 1

New User


Joined: 14 Oct 2007
Posts: 29
Location: Bangalore

PostPosted: Wed Sep 28, 2011 4:22 pm    Post subject:
Reply with quote

LRECL - 223
RECFM - FB
using DFSORT

Code:
records is like this
å.À%...                          ---- Rec1
4066000
774C009
å.À@...                          ---- Rec2
4067000
774C009  ......

o/p expecting like
å.À%...                          ---- Rec1
0000000
0001009
å.À@...                          ---- Rec2
0000000
0002009  ......

I just wnat to change sequence number from the beginning record.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Sep 28, 2011 4:38 pm    Post subject:
Reply with quote

jmreddymca wrote:
LRECL - 223
RECFM - FB
using DFSORT

Code:
records is like this
å.À%...                          ---- Rec1
4066000
774C009
å.À@...                          ---- Rec2
4067000
774C009  ......

o/p expecting like
å.À%...                          ---- Rec1
0000000
0001009
å.À@...                          ---- Rec2
0000000
0002009  ......
I just wnat to change sequence number from the beginning record.


Sambhaji asked you to use the Code tags. See the difference it makes?

I have no idea what you mean by "hexa", so perhaps you can explain that for us (or me, anyway).

I suspect you don't want to do what you say you want to do. I'm willing to bet a considerable sum (remember, that is all relative, I only bet really, really, tiny amounts) that the existing sequence number is actually a packed-decimal format.

4707646C and 4707647C is the hex "the other way" for your sequence numbers. Notice that the 6 changes to a 7, yet the C stays the same. That would be true for a packed-decimal field (in Cobol, Comp-3 PIC S9(7)). You are suggesting that you would like to change it to a 4-byte binary value starting from 00000001. If you do that without all the other programs that look at the sequence number changing, you will get incorrect results.

I suppose, maybe, your requirement is part of a change to convert the sequence number to a binary number, just on the off-chance that the file might one day accumulate to 2gig of numbers? If so, proceed as is. If not, start your sequence from one in a PD field for the Sort.
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Wed Sep 28, 2011 6:40 pm    Post subject:
Reply with quote

Try this code

Code:

  SORT FIELDS=COPY                   
  OUTREC OVERLAY=(1:SEQNUM,4,PD)     
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: Wed Sep 28, 2011 10:20 pm    Post subject:
Reply with quote

JMR,

Or if you really want BI sequence numbers, use:

Code:

    OPTION COPY
    OUTREC OVERLAY=(1:SEQNUM,4,BI)
Back to top
View user's profile Send private message
jmreddymca
Warnings : 1

New User


Joined: 14 Oct 2007
Posts: 29
Location: Bangalore

PostPosted: Thu Sep 29, 2011 8:55 am    Post subject:
Reply with quote

Thanks a lot Frank ,Bill,krato below code worked fine
OPTION COPY
OUTREC OVERLAY=(1:SEQNUM,4,BI)

Thanks a lot for your support.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Sep 29, 2011 5:08 pm    Post subject: Reply to: How to edit hexa value in the file
Reply with quote

Thanks. Not that helpful of me, I think.

So I loose my bet (Luckily it was my "left pocket" that won the bet, so no overall loss, even though "right pocket" is sad and out for revenge), and still don't know what Hexa is :-) Oh well, I'll wait for next time someone mentions it and ask again.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Sep 29, 2011 9:32 pm    Post subject:
Reply with quote

Hi Bill,

HEXA = Hexadecimal (over and under or side by side). Shows the individual nybbles rather than often unreadable bytes.

Over/under
Code:
å.À%...                         
4066000
774C009

å.À@...                         
4067000
774C009


And as you mentioned:
Quote:
4707646C and 4707647C is the hex "the other way"
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Sep 30, 2011 1:40 am    Post subject:
Reply with quote

Hi Dick,

Thanks. I've never heard it called that, we just called it all "hex" - allowed us more jokes about magic than hexa would have done, I suppose :-)

Learn something new every day.

Have to say, a bit obscure from the usage I've seen on the fora.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 30, 2011 2:13 am    Post subject:
Reply with quote

maybe, it is a non-fluent english speaker's abbreviation of hexadecimal
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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