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: 1100
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

Active Member


Joined: 29 Apr 2008
Posts: 931
Location: Maryland

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

Active Member


Joined: 29 Apr 2008
Posts: 931
Location: Maryland

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: 1348
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

Active Member


Joined: 29 Apr 2008
Posts: 931
Location: Maryland

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
This topic is locked: you cannot edit posts or make replies. Passing a field name to COBOL program COBOL Programming 10
No new posts Need to split single line into two li... DFSORT/ICETOOL 7
No new posts Hex Value - vb file replace old date ... DFSORT/ICETOOL 14
No new posts BMS map length field greater than zero CICS 3
No new posts Break a record into fields, each fiel... SYNCSORT 2
Search our Forums:

Back to Top