Error during file download

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
kulkabhijeet
New User
Posts: 10
Joined: Wed May 01, 2019 3:35 pm
First Name: Abhijeet
Last Name: Kulkarni
Company Name: Prime Therapeutics
Contact:

Error during file download

Post by kulkabhijeet »

Hello

We have set up the PUI Download in this way

Code: Select all

var checkInd = getObj("downloadexcel");
if (checkInd.value == 'true') {
  pui.download({ "id":  "FRAT060RG", "inline": "0" });
  pui.set("downloadexcel", false);
}
And the PUIDNLEXIT program is in PROFOUNDUI library.
The code added to that program is as below

Code: Select all

// Allow FRAT060RG program                                              
When %subst(inputData.fileId:1:9) = 'FRAT060RG';                        
                                                                        
  TmpDir = '/program work space/FRAT060RG';         
  stmfDir = %trim(TmpDir);                                              
  stmfName = 'Package_Setup_' +                                         
             %trim(inputData.userid) +                                  
             '_' + CharToday + '.xlsx';                                 
  attName  = stmfName;                                                  
  allow = 1;                                                            
The folder has the correct file generated
But When we try to download the excel, it gives us a error
"Error occurred calling PUIDNLEXIT program before download"

It blasts us out of the job completely, so we cannot even go and check the job log on hat is happening

Can you please help us in this ?
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: Error during file download

Post by Scott Klement »

Hello,

I don't understand what you mean by it "blasts" you out of the job?

In any case, it should've printed a job log to the spool that you can use to troubleshoot the error in your PUIDNLEXIT progam.
kulkabhijeet
New User
Posts: 10
Joined: Wed May 01, 2019 3:35 pm
First Name: Abhijeet
Last Name: Kulkarni
Company Name: Prime Therapeutics
Contact:

Re: Error during file download

Post by kulkabhijeet »

I am attaching the screen shot of what the screen looks like. From here we cannot go back in any way. We have to relogin.
Also if we want to check the job log on the green screen, the job ends and there is not even a job log
Attachments
Screen Shot
Screen Shot
2020-05-14_14-46-12.png (20.75 KiB) Viewed 985 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: Error during file download

Post by Scott Klement »

The reason this is taking over your Rich Display session is because you're running it in the same tab. This is controlled by the "inline" parameter. Try switching it to inline: true. This will cause it to run in a separate browser tab.

Code: Select all

pui.download({ "id":  "FRAT060RG", "inline": true });
The download does not run in the same IBM i job as the Rich Display, regardless of whether it is in the same browser window or not. So the job log of your RPG program that drives the display file isn't going to help.

Instead, look at the job log of the download job. It will be printed to the spool. (I said this in the last message, but maybe you missed it -- it is printed to the spool -- you won't find it in WRKACTJOB or similar.)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest