IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this forum will no longer be available. More details available on our FAQ.
Topic
  • 1 reply
  • Latest Post - ‏2019-01-13T10:44:17Z by richardm92
richardm92
richardm92
2 Posts

Pinned topic RUNSQLSTM from STMF with CCSID 1208

‏2019-01-07T17:24:55Z |

I'm attempting to run an SQL script from an RPGLE program by executing  the RUNSQLSTM command and specifying a SRCSTMF.

What I'm struggling with is understanding why the CCSID of the STMF is not being respected.

The SQL CREATE VIEW command contained within my STMF includes a hard-coded € (Euro symbol), the STMF has a CCSID of 1208.

When I process my RPGLE program the view is created but the € (Euro symbol) is shown as a ¤ character.

If I manually process the RUNSQLSTM command (from a command line) I get the same result.

The job I'm processing the RPGLE program (and RUNSQLSTM command) from has a CCSID of 1146 and if I view the STMF from this job I can see the Euro symbol.

If I run the same SQL statement through the ACS Run SQL Scripts interface then I get the Euro symbol.

Does the RUNSQLSTM command deal with CCSID conversions?

Has anyone had a similar issue?

- Richard

  • richardm92
    richardm92
    2 Posts
    ACCEPTED ANSWER

    Re: RUNSQLSTM from STMF with CCSID 1208

    ‏2019-01-13T10:44:17Z  

    This was me.

    I tried various things at various points and I had left in an explicit cast to CCSID 1208 within the view.

    When I removed this it worked as expected.

    - Richard

  • richardm92
    richardm92
    2 Posts

    Re: RUNSQLSTM from STMF with CCSID 1208

    ‏2019-01-13T10:44:17Z  

    This was me.

    I tried various things at various points and I had left in an explicit cast to CCSID 1208 within the view.

    When I removed this it worked as expected.

    - Richard