Universal PUIMAPP Question

Use this board to ask questions or have discussions with other Rich Displays users.
negley
Profound User
Posts: 45
Joined: Tue Mar 11, 2014 2:50 pm
First Name: William
Last Name: Negley
Company Name: Utz Quality Foods
Contact:

Universal PUIMAPP Question

Post by negley »

Hello,

I am attempting to create some JSON in Universal. I created a very simple sample project to try out tool. However, when i call my program via the http://server:8080/profoundui/universal/jsontest, it does not load any json to the screen. The page acts as if it is still loading. The program just writes and ends, no loops or logic.

My universal display file has a json object without variable data.

Thanks for the help!

-Bill
Attachments
PUIMAPP.png
PUIMAPP.png (3.33 KiB) Viewed 210747 times
rpgle.png
rpgle.png (5.74 KiB) Viewed 210747 times
dds.png
dds.png (7.48 KiB) Viewed 210747 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Universal PUIMAPP Question

Post by Scott Klement »

Hi Bill,

Can you please check the job log of the job to see if there are any errors? You can use WRKACTJOB JOB(PROFOUNDUI) (replace 'PROFOUNDUI' with the name of your HTTP server instance. PROFOUNDUI is our default name, but it's something that you can change when you install the product.)

My guess is that it's not loading because it's having trouble finding the display file in the library list, getting an authority error, or some other similar issue. The job log should hopefully tell us what's happening.

Thanks
negley
Profound User
Posts: 45
Joined: Tue Mar 11, 2014 2:50 pm
First Name: William
Last Name: Negley
Company Name: Utz Quality Foods
Contact:

Re: Universal PUIMAPP Question

Post by negley »

Well i feel silly now. Thanks!
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Universal PUIMAPP Question

Post by Scott Klement »

Did you figure out the problem?
negley
Profound User
Posts: 45
Joined: Tue Mar 11, 2014 2:50 pm
First Name: William
Last Name: Negley
Company Name: Utz Quality Foods
Contact:

Re: Universal PUIMAPP Question

Post by negley »

Yes i did, thanks! I was able to create some json to use with the ajaxJson function. Works like a charm!

If only i could do SOAP out of Universal, that would be great!
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Universal PUIMAPP Question

Post by Scott Klement »

You can do SOAP with the Universal Display files if you wish. SOAP is just XML that follows a particular standard -- if you use the Universal designer to input XML in SOAP format, it'll output SOAP, as expected.

Using a tool designed for SOAP would be easier, of course, since these generally do all of the XML work for you (so you don't have to code it yourself.) But if you don't mind coding the XML, the Universal display files would work fine.
negley
Profound User
Posts: 45
Joined: Tue Mar 11, 2014 2:50 pm
First Name: William
Last Name: Negley
Company Name: Utz Quality Foods
Contact:

Re: Universal PUIMAPP Question

Post by negley »

True, i guess what i meant was to be able to send and receive SOAP.
emhill
Experienced User
Posts: 116
Joined: Wed Sep 05, 2012 11:14 am
First Name: Eric
Last Name: Hill
Company Name: Integrated Corporate Solutions
Phone: 256-760-8239
Address 1: 501 S Wood Avenue
City: Florence
State / Province: Alabama
Zip / Postal Code: 35630
Country: United States
Contact:

Re: Universal PUIMAPP Question

Post by emhill »

Another question along those lines in this thread:

I have created a Universal Display and RPG to populate a select box using the "choices url" property of the select box. I have had to add libraries within my RPG so that it will pick up the "UNIVERSAL" handler and the files I am using in the RPG. I know in RPGsp we would use the SYNCJOB(*NO) to set the library list to to match PUI. Is there anything we can use that mimics that here? Am I missing a setting somewhere?

Thanks!!!!!
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Universal PUIMAPP Question

Post by Scott Klement »

You can use SyncJob(*ON) in a Universal Display as well, if needed. Just remember to make the files USROPN and open them after the SyncJob() call.
emhill
Experienced User
Posts: 116
Joined: Wed Sep 05, 2012 11:14 am
First Name: Eric
Last Name: Hill
Company Name: Integrated Corporate Solutions
Phone: 256-760-8239
Address 1: 501 S Wood Avenue
City: Florence
State / Province: Alabama
Zip / Postal Code: 35630
Country: United States
Contact:

Re: Universal PUIMAPP Question

Post by emhill »

Getting a binding error on create:
===================================================================================
Message . . . . : *SRVPGM object QZDMMDTA in library QSOC not found.
Cause . . . . . : *SRVPGM object QZDMMDTA in library QSOC was specified in
binding directory QUSAPIBD in library *LIBL, but was not found for binding.
Recovery . . . : Contact your application provider or service
representative.
CPD5D02 Diagnostic 30 11/18/14 16:48:09.406744 QBNBIND QSYS *STMT QBNBIND QSYS *STMT
From module . . . . . . . . : QBNBSYMR
From procedure . . . . . . : QBNBSYMR__UnresolvedReferenceIterator
Statement . . . . . . . . . : 31
To module . . . . . . . . . : QBNBSYMR
To procedure . . . . . . . : QBNBSYMR__SignalUnresolvedReferences
Statement . . . . . . . . . : 8
5770SS1 V7R1M0 100423 Job Log S104DB7A 11/18/14 16:48:09 Page 2
Job name . . . . . . . . . . : TESTBR User . . . . . . : ERIC Number . . . . . . . . . . . : 009647
Job description . . . . . . : ERIC Library . . . . . : QGPL
MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST
Message . . . . : Definition not found for symbol 'SYNCJOB'.
Cause . . . . . : No definition was found for reference SYNCJOB in *MODULE
object TESTBR in library QTEMP. The definition either does not exist or is
not of the same data or procedure type as the reference. Recovery . . . :
Try the Create Program (CRTPGM) command again, supplying an object that
contains a definition for symbol SYNCJOB.
===============================================================================

Code: Select all

H DFTACTGRP(*NO) ACTGRP(*NEW)

FUNVBRF    CF   E             WorkStn Handler('UNIVERSAL(HANDLER)')
F                                     USROPN
/COPY QCPYLESRC,SYCDXFUSO
/COPY QPROTO,SYSTEMCMD
/COPY PROFOUNDUI/QRPGLEINC,PUISYNCR

/COPY QCPYLESRC,SYCDXD
/COPY QCPYLESRC,LDAUDS400
/COPY QCPYLESRC,PGMDS

/COPY QCPYLESRC,SYCDXI

      /FREE

        //monitor;
        //   system('ADDLIBLE LIB(ICSUI) POSITION(*LAST)');
        //on-error;
        //endmon;

        //monitor;
        //   system('ADDLIBLE LIB(ICS) POSITION(*LAST)');
        //on-error;
        //endmon;

        //monitor;
        //   system('ADDLIBLE LIB(PROFOUNDUI) POSITION(*LAST)');
        //on-error;
        //endmon;

        SyncJob(*ON);

        open unvbrf;
        open sycdx;
        *IN95 = *ON;

        Read HEADER;
        Write HEADER;

        if required <> 'Y';
           BrName = *blanks;
           BrCde = *blanks;
           Write DETAIL;
        endif;

        if aster = 'Y';
           BrName = '*';
           BrCde = '*';
           Write DETAIL;
        endif;

        sxkey = *blanks;
        sxcomp = mycomp;
        sxnem = 'BR  ';

        setll sxkeyc sycdx;
        reade sxkeyc sycdx;

        DoW Not %EOF();
          BrName = scbrcd + '-' + %trim(scbnam);
          BrCde = scbrcd;
          Write DETAIL;
          Reade sxkeyc sycdx;
        EndDo;

        Write FOOTER;

        *InLr = *On;

      /END-FREE
What am I doing wrong?

Thanks!!!!!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests