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

Foreign character look different in memory than on disk.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue May 12, 2020 8:13 am
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts CA Disk LISTD SQL CA Products 1
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
No new posts String has hex character need to conv... COBOL Programming 3
No new posts Output LREC based on specific character DFSORT/ICETOOL 22
No new posts Replacing character string in file th... JCL & VSAM 9
Search our Forums:

Back to Top