Portal | 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
 
Replace comp-3 field value to comp-3 field value by

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Replace comp-3 field value to comp-3 field value by
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: 1091
Location: Dublin, Ireland

PostPosted: Fri Sep 14, 2018 4:09 pm    Post subject:
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: 859
Location: Maryland

PostPosted: Sat Sep 15, 2018 6:13 am    Post subject: Re: Replace comp-3 field value to comp-3 field value by
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: 859
Location: Maryland

PostPosted: Sat Sep 15, 2018 8:53 pm    Post subject: Re: Replace comp-3 field value to comp-3 field value by
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    Post subject: Re: Replace comp-3 field value to comp-3 field value by
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: 859
Location: Maryland

PostPosted: Mon Sep 17, 2018 5:19 pm    Post subject: Re: Replace comp-3 field value to comp-3 field value by
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    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 Hex Value - vb file replace old date ... premnath DFSORT/ICETOOL 10 Sat Oct 17, 2020 3:15 am
No new posts BMS map length field greater than zero Ziko13 CICS 3 Fri Oct 09, 2020 5:40 pm
No new posts Break a record into fields, each fiel... jackare SYNCSORT 2 Thu Oct 08, 2020 5:26 am
No new posts SYNCSORT Error - CONTROL FIELD BEYOND... arunn SYNCSORT 10 Sun Oct 04, 2020 4:10 pm
No new posts Unable to display comp variable shub2204 COBOL Programming 4 Fri Oct 02, 2020 7:05 pm

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