Re: Problems reading from Stdin

<stefan-6HgPSzB/[email protected]> Mon, 12 Dec 2022 18:47:12 +0100
Newsgroups gmane.comp.systems.as400.web
Message-ID <[email protected]>
Hi Dave,

For my applications to work, Content-type text/xml is required, and then the Apache server is able to convert from ascii 819 to in my case ebcdic 278 .
If I use content-type application/xml the conversion fails ( unreadable as you say ).
Your scriptlog is that an IFS-file? If so - what ccsid do you have? 297?

Best regards

Stefan

-- 
No trees were killed in the sending of this message, but a large number of electrons were terribly upset.

Stefan Tageson
+46 732 369934
[email protected]

-----Original Message-----
From: WEB400 <[email protected]> On Behalf Of Dave
Sent: Monday, December 12, 2022 3:00 PM
To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]>
Subject: Re: [WEB400] Problems reading from Stdin

Stefan,

I stumbled upon another communication of yours on this subject or something related but now I've forgotten where.
Anyway, the solution was to select "Text" rather than "XML" for the format of the body in Postman.

However, I've now noticed that when I indicate XML in Postman (and the data is unreadable in my RPG program), the XML is readable in my Scriptlog file.
But if I indicate Text in Postman, the RPG program can read the data and the Scriptlog file is unreadable!
In this case, a message indicates '..INVALID CHARCTERS FOR CCSID 0128..."
(complete with misspelling :-)) . If I change the CCSID to 297, I can read the xml in scriptlog but not the data preceding it (that which concerns the http request).
It's just getting curiouser and curiouser


On Mon, 5 Dec 2022 at 13:52, Dave <[email protected]> wrote:

> Thanks, nothing's working though and I don't fully understand what's 
> going on. I've tried all the different parameters of CGIConvMode I 
> hate this kind of thing, it should be so obvious.
>
>
>
>
>
>
> On Fri, 2 Dec 2022 at 18:53, <[email protected]> wrote:
>
>> Bonjour Dave, ( based on ccsid 297 )
>>
>> You're correct - guess option 22 showed up on v7r3.
>>
>> Have a look at your Apache configuration, I have CGIConvMode 
>> %%EBCDIC/MIXED%%
>>
>> I've heard that CGIConvMode %%MIXED/MIXED%% is the preferred one, but 
>> we have issues with that one as our ssl certificates includes 
>> nonascii characters.
>> As soon as we get rid of those we will change to CGIConvMode 
>> %%MIXED/MIXED%%.
>>
>> Best regards
>>
>> Stefan
>>
>> --
>> No trees were killed in the sending of this message, but a large 
>> number of electrons were terribly upset.
>>
>> Stefan Tageson
>> +46 732 369934
>> [email protected]
>>
>> -----Original Message-----
>> From: WEB400 <[email protected]> On Behalf Of Dave
>> Sent: Friday, December 2, 2022 6:20 PM
>> To: Web Enabling the IBM i (AS/400 and iSeries) < 
>> [email protected]>
>> Subject: Re: [WEB400] Problems reading from Stdin
>>
>> Thanks Stefan,
>>
>> I don't have the option 22, guessing it's because we are only on V7R1
>>
>> I used qtmhgetenv and got these values :
>>
>> >
>> > GATEWAY_INTERFACE           'CGI/1.1'
>> > SERVER_PROTOCOL             'HTTP/1.1'
>> > REQUEST_METHOD              'POST'
>> > CGI_MODE                    'EBCDIC'
>> > CGI_OUTPUT_MODE             ' EBCDIC’
>> > IBM_CCSID_VALUE             '297'
>> > CGI_EBCDIC_CCSID            '297'
>> > CGI_ASCII_CCSID             '819'
>> > FSCP                        '297'
>> > NETCP                       '819'
>> >
>> >
>> >
>>
>>
>>
>>
>> > Hi Dave,
>> >
>> > > I'm posting xml data copied and pasted into POSTMAN to my CGI
>> programme.
>> > Using QtmhRdStin to read the data but it shows up completely unreadable.
>> >
>> > If you run a Postman request that works towards your IBM i and the 
>> > look at one of the Apache-jobs ( WRKACTJOB ) that have a Function of '
>> PGM-QZSRCGI'.
>> > Use option 5 (WRKJOB) and then option 22 to look at the environment 
>> > variables for that job.
>> > What do you have for the following environment variables:
>> >
>> > GATEWAY_INTERFACE           'CGI/1.1'
>> > SERVER_PROTOCOL             'HTTP/1.1'
>> > REQUEST_METHOD              'POST'
>> > CGI_MODE                    '%%EBCDIC%%'
>> > CGI_OUTPUT_MODE             '%%MIXED%%'
>> > IBM_CCSID_VALUE             '278'
>> > CGI_EBCDIC_CCSID            '278'
>> > CGI_ASCII_CCSID             '819'
>> > FSCP                        '278'
>> > NETCP                       '819'
>> >
>> > Best regards
>> >
>> > Stefan
>> >
>> > --
>> > No trees were killed in the sending of this message, but a large 
>> > number of electrons were terribly upset.
>> >
>> > Stefan Tageson
>> > +46 732 369934
>> > [email protected]
>> >
>> >
>> > --
>> > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) 
>> > mailing list To post a message email: [email protected] To 
>> > subscribe, unsubscribe, or change list options,
>> > visit: https://lists.midrange.com/mailman/listinfo/web400
>> > or email: [email protected] Before posting, please 
>> > take a moment to review the archives at 
>> > https://archive.midrange.com/web400.
>> >
>> > ------------------------------
>> >
>> > *Expéditeur externe à l'organisation*
>> >
>> > Cet e-mail provient d'une personne externe à votre organisation. Si 
>> > vous ne connaissez pas l'expéditeur et que vous n'êtes pas sûr que 
>> > le contenu est fiable, veillez à toujours examiner l’expéditeur, le 
>> > sujet, le texte et *en cas de doute, ne pas cliquer sur les liens 
>> > ou les pièces jointes. *
>> >
>> >
>> >
>> --
>> This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) 
>> mailing list To post a message email: [email protected] To 
>> subscribe, unsubscribe, or change list options,
>> visit: https://lists.midrange.com/mailman/listinfo/web400
>> or email: [email protected] Before posting, please 
>> take a moment to review the archives at https://archive.midrange.com/web400.
>>
>>
>> --
>> This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) 
>> mailing list To post a message email: [email protected] To 
>> subscribe, unsubscribe, or change list options,
>> visit: https://lists.midrange.com/mailman/listinfo/web400
>> or email: [email protected] Before posting, please 
>> take a moment to review the archives at 
>> https://archive.midrange.com/web400.
>>
>>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/web400.


-- 
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.