473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 3585
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 the different cogs in the wheel centering around...
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 additional information). Is there a function in db2...
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 help are greatly appreciated. protected...
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 string and a codepage (based upon the basic MSDN...
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 resource files for strings, formatting etc. I...
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 registered trade mark differently? Example: ...
17
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...
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 numbers and then grab any comment that may or may...
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 so I don't know the upper bounds of the sql query....
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 is english, if you use it by default it will...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.