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
 
Foreign character look different in memory than on disk.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
hsinaz50

New User


Joined: 09 Apr 2014
Posts: 5
Location: United States

PostPosted: Tue May 12, 2020 6:40 am    Post subject: Foreign character look different in memory than on disk.
Reply with quote

I have a name/address text field in DB2 that has characters such as À ñ Ö ë etc. When I retrieve them with SPUFI/other query software they look exactly like that. When I debug using IBM Problem Determination tools, they look correct (same as above), when I look at their movement through various in-memory locations, again, they look the same. e.g. ÉXPAÑSION

1) When I write them to disk/a flat file on the mainframe through a COBOL program, they change to completely different characters such as ^s or blanks or underlined capital Zs or Us. e..g the above changes to ^XPAZSION

2) Then if I browse at the disk/flat file using IBM file manager, they look yet again different. Most of the ^ or blanks or underlined letter in #1 above look to be dots (period signs). e.g. the above yet again looks like .XPA.SION

All throughout, the receiving fields are defined as CHAR.

Q1. Is there a way I can get COBOL to output the same characters that are in my source (DB2)?
Q2. If Q1 can be fixed, how can I send the exact same characters via NDM to a windows server (i.e. is there a NDM/connect direct option to be specified)

Thank you.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Tue May 12, 2020 8:13 am    Post subject: Reply to: Foreign character look different in memory than on disk.
Reply with quote

You need to research ccsid. Probably your DB2 ccsid isn't the COBOL default (which can be changed with a compiler option.
Back to top
View user's profile Send private message
hsinaz50

New User


Joined: 09 Apr 2014
Posts: 5
Location: United States

PostPosted: Tue May 12, 2020 7:36 pm    Post subject: Re: Reply to: Foreign character look different in memory than on disk.
Reply with quote

Robert Sample wrote:
You need to research ccsid. Probably your DB2 ccsid isn't the COBOL default (which can be changed with a compiler option.

Researched this today. DB2 database level, and even at source column level CCSID is 37. COBOL compiler is CODEPAGE(1140). Per IBM they both are equivalent icon_neutral.gif
Back to top
View user's profile Send private message
hsinaz50

New User


Joined: 09 Apr 2014
Posts: 5
Location: United States

PostPosted: Fri May 15, 2020 7:11 am    Post subject: Re: Reply to: Foreign character look different in memory than on disk.
Reply with quote

hsinaz50 wrote:
Robert Sample wrote:
You need to research ccsid. Probably your DB2 ccsid isn't the COBOL default (which can be changed with a compiler option.

Researched this today. DB2 database level, and even at source column level CCSID is 37. COBOL compiler is CODEPAGE(1140). Per IBM they both are equivalent icon_neutral.gif

Any further ideas on this please. I checked more today and the DB2 hex values of these characters and the on-disk hex values when written match, but the on-disk character look different in ISPF edit that DB2 as I mentioned above.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SARBCH PRINTJOB option not Works with... Gepinheim CA Products 4 Mon Sep 02, 2019 9:26 pm
No new posts Build Dynamic Sort output and limit '... balaji81_k DFSORT/ICETOOL 3 Sat Feb 02, 2019 4:40 am
No new posts how can I access zEDC shared disk fro... hossy Mainframe Interview Questions 3 Sat Jul 28, 2018 10:14 am
No new posts Removing spaces before the tab character V S Amarendra Reddy SYNCSORT 1 Thu Jun 14, 2018 8:45 am
No new posts Splitting one row into multiple Rows ... Rajan Moorthy DFSORT/ICETOOL 9 Mon May 14, 2018 10:58 pm

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