Portal | Manuals | 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
 
Amount field is getting corrupted when Using "LTOU"

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 147
Location: INDIA

PostPosted: Tue Oct 18, 2016 8:20 pm    Post subject: Amount field is getting corrupted when Using "LTOU"
Reply with quote

Hi All,

I am converting an entire file form Lower to uppercase thru below sort card

Code:
SORT FIELDS=(1,7,CH,A)             
OUTREC OVERLAY=(1:1,1600,TRAN=LTOU)



This file has many fields defined as Binary,Packed Decimal and so on .. I want to convert an alphanumeric value in the file I don't know where it appears and whether it is upper or lower.. So planned to Convert the entire file . after converting I am getting below scenario

Some Amount fields Which are defined as COMP-3 are corrupted and not displayed as ********* in file manager when mapped with copybook.

Code:
Converted Field
           #186
      PD 1035:5
    <---+----1>
    ***********  ---->  This is Display Value
          46C02      -----> These 2 lines are the HEX Value
          5791C


Before conversion

Code:
FIELD
           #186
      PD 1035:5
    <---+----1>
     4567890.12 ---->  This is Display Value
          46802    These 2 lines are the HEX Value
          5791C



Can we rectify this issue or can we check the lower case and if found then convert it to upper .

Any Help is Much Appreciated. Many Thanks in Advance.


Sumit
Back to top
View user's profile Send private message

enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10637
Location: italy

PostPosted: Tue Oct 18, 2016 8:35 pm    Post subject: Reply to: Amount field is getting corrupted when Using "LTOU"
Reply with quote

You should translate ONLY the fields that You know as alphabetics

translating anything else would mean to clobber binary and packed data
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 627
Location: Maryland

PostPosted: Tue Oct 18, 2016 8:35 pm    Post subject:
Reply with quote

You are not allowed to include any non-text field (e.g. not PIC X(nnn) ) into your OVERRIDE positions range.

Now you get exactly what you requested.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8504
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 18, 2016 8:40 pm    Post subject:
Reply with quote

Well, the system did EXACTLY what you told it to do. The X'89' is a lower case I, and it got converted to an upper case I (x'C9') just as it was supposed to. The fact that the lower case I was in the middle of a packed decimal field didn't matter since you told the system to convert the entire record.

When you have binary or packed decimal fields in your record, you MUST convert each character field individually -- or you will have problems with inappropriate translations (as you have seen).
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 147
Location: INDIA

PostPosted: Tue Oct 18, 2016 11:05 pm    Post subject: Reply to: Amount field is getting corrupted when Using "LTOU"
Reply with quote

Thanks all for your responses and time you spent to help me .. Much appreciated , I will try to find an alternate to complete this task perhaps easytrieve or cobol.


Thanks Again !!


Sumit
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10637
Location: italy

PostPosted: Tue Oct 18, 2016 11:30 pm    Post subject: Reply to: Amount field is getting corrupted when Using "LTOU"
Reply with quote

it will be boring to write the build with the input positions/lengths,

in any case for the other approaches You will have to write the <copybook> for the output

at the end not too much difference ,
probably with sort You will end writing less stuff
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort for field to field comparision Deepti_R SYNCSORT 3 Thu Nov 07, 2019 11:04 pm
No new posts SECTION BASED ON FIELD speermb DFSORT/ICETOOL 10 Mon Jun 17, 2019 9:41 pm
No new posts Send text at cursor position on an IS... Domenic Ailati CLIST & REXX 10 Sun Jun 02, 2019 7:34 am
No new posts Display Signed ZD field socker_dad DFSORT/ICETOOL 11 Thu Feb 28, 2019 1:17 am
No new posts "Standard" SYSIN, SYSPRINT ... steve-myers PL/I & Assembler 0 Fri Feb 08, 2019 7:56 am

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