472,338 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,338 software developers and data experts.

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_length;
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 3522
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_length;
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
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...
4
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...
11
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...
8
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...
2
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...
11
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...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename =...
13
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...
5
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...
6
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.