IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Replace comp-3 field value to comp-3 field value by


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dharmaraok

New User


Joined: 10 Mar 2011
Posts: 45
Location: india

PostPosted: Fri Sep 14, 2018 3:46 pm
Reply with quote

I have field in a file having comp-3 value 2017. I need to convert this field with 2018. I have written Overlay in SORT card but it is not working.

INREC OVERLAY=(85:X'2018')

Please help me how to conver the field by using sort
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Sep 14, 2018 4:09 pm
Reply with quote

Wouldn't a COMP-3 field have a sign (e.g. X'02017C' ) ? And wouldn't you want to replace that with X'02018C' ?

And are you going to change every record in the dataset, even if it has a value other than 2017 ?

What have you tried and with what result?

Garry
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Sat Sep 15, 2018 6:13 am
Reply with quote

dharmaraok wrote:
I have field in a file having comp-3 value 2017. I need to convert this field with 2018. I have written Overlay in SORT card but it is not working.

INREC OVERLAY=(85:X'2018')

Please help me how to conver the field by using sort

Please demonstrate
1) real code; at least - FULL set of your SORT statements
2) example of input data, with recognizable offset, and hex image
3) actual output data, with recognizable offset, and hex image

Without this info, the answer to your question would be: please, do everything right, and the result should not be wrong.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Sat Sep 15, 2018 8:53 pm
Reply with quote

dharmaraok wrote:
I have field in a file having comp-3 value 2017. I need to convert this field with 2018. I have written Overlay in SORT card but it is not working.

INREC OVERLAY=(85:X'2018')

Please help me how to conver the field by using sort

COMP-3 only exists inside COBOL code. Out of COBOL there is no such thing as COMP-3. Verify your terminology.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Sep 17, 2018 1:05 pm
Reply with quote

dharmaraok wrote:
I have written Overlay in SORT card but it is not working.
Usually, this sentence is not well received in the forum icon_evil.gif
What is not working ?
Does it cancel or does it finish with a return code or does it produce an incorrect output ?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Mon Sep 17, 2018 5:19 pm
Reply with quote

Marso wrote:
dharmaraok wrote:
I have written Overlay in SORT card but it is not working.
Usually, this sentence is not well received in the forum icon_evil.gif
What is not working ?
Does it cancel or does it finish with a return code or does it produce an incorrect output ?

...or the computer got fire, and was destroyed completely? icon_pray.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top