Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power


#Servers
#Programminglanguages
 View Only
  • 1.  getting email address from directory entries

    Posted 07/27/23 10:38 AM

    is there a way using sql services or sql to get the email address from the system - the one in WRKDIRE command?



    ------------------------------
    David Strawn
    ------------------------------

    #SQL


  • 2.  RE: getting email address from directory entries

    Posted 07/27/23 08:35 PM
    Edited by Satid Singkorapoom 07/27/23 08:42 PM

    Dear David

    From a Google search, I find this Technote on restoring system directory entries :  https://www.ibm.com/support/pages/restoring-system-directory-entries.  It mentions a number of file names (QAO..... with wild card) in QUSRSYS library. You may want to explore each of them if you can see the e-mail in there.  Once you see it, a simple SQL SELECT can be used.

    I suggest you make use of IBM i ACS GUI on Schemas to do this.  You do a right-click in Tables container and select Include... and specify QAO to see the list of these files.

    Right-click each table and select Data --> View to see its content. 



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 3.  RE: getting email address from directory entries

    Posted 07/28/23 11:06 AM

    This is what I see when i view the data...



    ------------------------------
    David Strawn
    ------------------------------



  • 4.  RE: getting email address from directory entries

    Posted 07/28/23 11:33 AM

    The character columns are defined with CCSID 65535, so it will show you the hex values in this environment.

    What do you see if you run the SELECT * FROM QUSRSYS.QAOCCL5 from ACS Run SQL-Script?



    ------------------------------
    Birgitta Hauser
    Database and Software Engineer
    Selfemployed - Modernization-Education-Consulting on IBM i
    Kaufering
    +49 170 5269964
    ------------------------------



  • 5.  RE: getting email address from directory entries

    Posted 07/28/23 02:41 PM

    same thing, the hex



    ------------------------------
    David Strawn
    ------------------------------



  • 6.  RE: getting email address from directory entries

    Posted 07/29/23 04:47 AM

    Did you set the Translate CCSID 65535 in your connection?



    ------------------------------
    Birgitta Hauser
    Database and Software Engineer
    Selfemployed - Modernization-Education-Consulting on IBM i
    Kaufering
    +49 170 5269964
    ------------------------------



  • 7.  RE: getting email address from directory entries

    Posted 07/28/23 08:48 PM
    Edited by Satid Singkorapoom 07/29/23 02:08 AM

    Dear David

    The solution is to use Run SQL Script tool  and :

    - Set the CCSID of the user profile you use to sign on to ACS connection to a proper value, for example 37 (EBCDIC English)

    - From Run SQL Script main menu, select  Edit --> JDBC Configurations, then click EDIT button in the new window that appears, then click the tab name TRANSLATION and check the option "Translate CCSID 65535" and click Save button.

    Technote on Run SQL Scripts - unreadable characters at https://www.ibm.com/support/pages/run-sql-scripts-unreadable-characters


    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 8.  RE: getting email address from directory entries

    Posted 07/27/23 09:56 PM
    Edited by Satid Singkorapoom 07/27/23 10:20 PM

    From DB2i metadata query  select * from qsys2.systablestat where table_name like 'QAO%' and number_rows > 0 ;  I find a few tables in the result and table QAOKPSRA in QUSRSYS contains the highest number of rows. So, I look into it and think this is the one to answer your question.  Please check it out.

    Start with  select * from  qusrsys.qaokpsra where WOKSDEN = '<user profile - all uppercase>' ;   and you will see what else you need to add to the WHERE clause to get what you want - most likely the column WOKSFLD. The e-mail should appear in the column WOKSVAL.



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 9.  RE: getting email address from directory entries

    Posted 07/31/23 11:34 AM

    checking Translate CCSID took care of it...  Thanks!  thanks for the input!



    ------------------------------
    David Strawn
    ------------------------------



  • 10.  RE: getting email address from directory entries

    Posted 08/01/23 12:45 PM

    David,

    I'm in the US.  Many of us here have changed this system value, QCCSID, to 37 in the middle of the day with no ill ramifications.  YMMV and whatever disclaimers are available apply.

    I think it's best to assume that IBM set it to 65535 to frustrate you to the point that you pick an appropriate value for your location.

    If you follow the instructions in setting up a new system it will tell you to set this system value to an appropriate value.  But I'll be danged if I can find that reference directly.

    https://www.ibm.com/docs/en/i/7.5?topic=values-coded-character-set-identifier-qccsid-system-value

    https://www.ibm.com/docs/en/i/7.5?topic=information-default-system-values-national-language-versions

    https://www.ibm.com/docs/en/i/7.5?topic=information-ccsid-reference



    ------------------------------
    Robert Berendt IBMChampion
    ------------------------------