473,757 Members | 10,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

newbe question: convert codepage

Hello all,

I'm new to AS400 and we have a problem here with a sql-procedure, that is
running OK over the Client Access Navigator, but over the 5250 emulator
hanging with an error "pointer for the given position not set" (anything
like that I think, I have the error in german and here I mean, I have just
translated it, but not sure, if the error is shown in english in that way!).

Here a peace of code:

1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <decimal.h>
5 #include <wcstr.h>
6 #include <stddef.h>
7 #include <sqlproc.h>
8 typedef _Packed struct GETDIAG_RTN_t {
9 long message_length;
10 long message_octet_l ength;
11 char message_text[1025]; };
............... ............... .... and so on

As I said, running this over the Navigator, works probably well. If I run it
on the 5250 emulator, than I become the error ("pointer for the given
position von set. Application error. MCH3601 .... on 0000000011, instruction
X'0000' not audited").

I think that with the code traslation is sth. wrong. Can you tell me, how
can I use the function "iconv.h" to traslate the code to 1025?
I've searched the KB of IBM Developer and found there a sample, but I have
some problems to use this on our code.

Help will be appreciated. Thanks a lot in advance for your help.

Regard from Germany
Beni


Nov 12 '05 #1
2 3615
Arben Qarkaxhija wrote:

I'm new to AS400 and we have a problem here with a sql-procedure, that is
running OK over the Client Access Navigator, but over the 5250 emulator
hanging with an error "pointer for the given position not set" (anything
like that I think, I have the error in german and here I mean, I have just
translated it, but not sure, if the error is shown in english in that way!).

Here a peace of code:

1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <decimal.h>
5 #include <wcstr.h>
6 #include <stddef.h>
7 #include <sqlproc.h>
8 typedef _Packed struct GETDIAG_RTN_t {
9 long message_length;
10 long message_octet_l ength;
11 char message_text[1025]; };
............... ............... ... and so on

As I said, running this over the Navigator, works probably well. If I run it
on the 5250 emulator, than I become the error ("pointer for the given
position von set. Application error. MCH3601 .... on 0000000011, instruction
X'0000' not audited").

I think that with the code traslation is sth. wrong. Can you tell me, how
can I use the function "iconv.h" to traslate the code to 1025?
I've searched the KB of IBM Developer and found there a sample, but I have
some problems to use this on our code.

Help will be appreciated. Thanks a lot in advance for your help.

Regard from Germany
Beni

Normally MCH3601 occurs when a program attempts to use a pointer that is
not set. Try recreating the error, and view the job log of the 5250
emulator job. If you have a printed job log, find the "To program" for
the MCH3601 message (exception). If the job is still active, view its
job log using (for example) WRKJOB option 10, place the cursor on the
message and press F1 (Help) followed by F9 (Display message details).
This will also show the "To program" information. This information may
be useful to determine if your program is causing the exception. If it
is, you may be able to use a debugger to determine why the pointer is
not set.

Re usage of iconv(), here is an example found by searching the InfoCenter:
http://publib.boulder.ibm.com/iserie...zaha/jniex.htm

Here is another link, to info about Data Conversion APIs:
http://publib.boulder.ibm.com/iserie.../apis/nls3.htm

--
Karl Hanson

Nov 12 '05 #2
Hello Karl,

many thanks for your answer. I'll check this.

Best regards

Beni
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4973
by: Mark | last post by:
Hi... I've been doing a lot of work both creating and consuming web services, and I notice there seems to be a discontinuity between a number of the different cogs in the wheel centering around windows-1252 and that it is not equivalent to iso-8859-1. Looking in the registry under HKEY_CLASSES_ROOT\MIME\Database\Charset and \Codepage, it seems that all variations on iso-8859-1 (latin1, etc) are mapped to code page 1252, which I'm...
4
56403
by: alederer | last post by:
Hallo! I need to convert the values of a varchar (..) for bit data column to a string which can be stored in a normal varchar column (with additional information). Is there a function in db2 which supports this? I think it must be possible to convert it in base64 format. Of course I also need a function for the opposite direction.
11
17418
by: Kai Bohli | last post by:
Hi all ! I need to translate a string to Ascii and return a string again. The code below dosen't work for Ascii (Superset) codes above 127. Any help are greatly appreciated. protected internal string StringToAscii(string S) { byte strArray = Encoding.UTF7.GetBytes(S); string NewString = Encoding.UTF7.GetString(strArray);
8
1874
by: pagates | last post by:
Hello, I am playing a little with Encoding, and I have what is possibly (forgive me) a newbie-type question. I have a function that takes a string and a codepage (based upon the basic MSDN help - look for "Using Unicode Encoding"). Anyway, I want to pass the contents of a textbox "as is", but always get a literal string. Using the example from MSDN, say I want to pass in this
2
1798
by: Mike Prager | last post by:
Hi, I have written a Hotmail type application where users choose their language preference which is used to set the culture and hence the correct resource files for strings, formatting etc. I now need to create a mime message but I have to pass in the correct encoding so the charset is correctly selected. I cannot find any progrmmatic correlation between the two? Is there any way to derive from a users culture the correct language and...
11
2389
by: Roy | last post by:
Does anybody have any idea why 2 identical classic asp pages, hitting the same Oracle schema, but deployed on 2 different servers will render the registered trade mark differently? Example: PROTONIX® get displayed when calling the page deployed on server A, while
17
2720
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not pattern1 print >>orcfilename, line I am pretty sure my code isn't close to what I want. I need to be able
13
1724
by: Eric_Dexter | last post by:
All I am after realy is to change this reline = re.line.split('instr', '/d$') into something that grabs any line with instr in it take all the numbers and then grab any comment that may or may not be at the end of the line starting with ; until the end of the line including white spaces.. this is a corrected version from http://python-forum.org/py/viewtopic.php?t=1703
5
1930
by: troy | last post by:
Could someone please point me in the right direction on how to read in a large query with .net. I am trying to emulate a legacy database system so I don't know the upper bounds of the sql query. An example query would be something like: Select * from invoices where year 1995 the query must be updatable and only return say 10 to 100 rows at a
6
1778
by: hamiiied | last post by:
Hi All ... How can you set asp response cookies to unicode language like chinase, arabic, etc... For your information; response cookies by default is english, if you use it by default it will print any unicode letters to ? quationmark ... Waiting Your Solutions ............
0
9489
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9298
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9906
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9737
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7286
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3829
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2698
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.