Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

TechTip: Work with CGI Spooled Files (WRKCGISPLF)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    TechTip: Work with CGI Spooled Files (WRKCGISPLF)

    ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
    I would like to thank Steven for sharing this program to us. I finally have it running after many tries. From my URL I typed http://myiseries/cgi-bin/wrkcgisplf. I am using CONFIG as my HTTP server instance and had to add 2 directives as shown below (seq# 01020 & 01030). The protection directives (seq#00470 to 00620) are for allowing only valid AS400 users to run this program and viewing only spooled files that they have access to. If you opt not to include these protection directives, make sure that your outqueues DSPDTA parameter is set to *YES. Don't forget to stop and start the DEFAULT http server after applying the changes. 00470 Protection WRKSPLF { 00480 PasswdFile %%SYSTEM%% 00490 ACLOverride Off 00500 PostMask All 00510 GetMask All 00520 AuthType Basic 00530 ServerID Work_with_Spooled_Files 00540 UserID %%CLIENT%% 00550 } 00620 Protect /cgi-bin/wrkcgisplf WRKSPLF 01020 Map /cgi-bin/* /QSYS.LIB/YOURLIB.LIB/*.PGM 01030 Exec /QSYS.LIB/YOURLIB.LIB/*

    Comment


    • #17
      TechTip: Work with CGI Spooled Files (WRKCGISPLF)

      ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
      I can't wait to get in and change the way it looks etc to fit in with the CSS schemes of the rest of our web pages. Thanks for providing an interesting powerful utility

      Comment


      • #18
        TechTip: Work with CGI Spooled Files (WRKCGISPLF)

        ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
        Hi apagilagan, Thanks for the directives that you give. It indirectly answer my previous question that I've posted in IGNITe-400. I really appreciate it!! Now, can the user ID that is keyed in be pass to the CGI program? regards

        Comment


        • #19
          TechTip: Work with CGI Spooled Files (WRKCGISPLF)

          ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
          Hi Apagilagan Thank for the tip!! How can I pass a user ID from the password dialog box if I don't want to get the it (the user ID) from the first page of the WRKCGISPLF? (Meaning I don't want user to go to other people's spoolfile) regards

          Comment


          • #20
            TechTip: Work with CGI Spooled Files (WRKCGISPLF)

            ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
            Hi Araman, Remote user id can be retrieved by calling the cgi interface API QtmhGetEnv. This API has been called a number of times under $ProcInput subroutine. Just copy the lines that retrieve the REQUEST_METHOD and change the literal 'REQUEST_METHOD' into 'REMOTE_USER'. After the statement that calls the API, insert a statement to move the first 10 characters of InBuffer into a global variable. In the MakePrompt subprocedure, move the value of that global variable into UserName instead of the default value of *ALL.

            Comment


            • #21
              TechTip: Work with CGI Spooled Files (WRKCGISPLF)

              ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
              Hi, I believe this is an authorization issue. You did not mention whether you use the protection directive or not. If you did, it means that the user id you used to log on is not authorized to the spool files of the user you keyed in in WRKCGISPLF screen. If not, I believe user id QTMHHTP1 is being used to log on for which it has no special authority. You may want to change the DSPDTA parameter on your output queue from *NO to *YES to allow all users to have access to any spool files.

              Comment


              • #22
                TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                Gee!! Thanks again Apagilagan!! You are good in API. Any AS/400 manuals/redbooks that you can suggest on API programming? I cannot find QtmhGetEnv inside System API Programming and System API Reference. Thanks a lot man!!

                Comment


                • #23
                  TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                  ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                  You're welcome! You can check the HTTP Server for AS400 Web Programming Guide for some API's related to CGI Programming.

                  Comment


                  • #24
                    TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                    ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                    Start at the info center: http://publib.boulder.ibm.com/iserie...2924/index.htm At the top, type in QtmhGetEnv, and you will get a link to the API documentation. The direct link is: http://publib.boulder.ibm.com/iserie...qtmhgetenv.htm Also, if you go to the infocenter and go to Programming/APIs, you will see an option called API Finder. Very cool search engine. http://publib.boulder.ibm.com/iserie.../apifinder.htm Joe

                    Comment


                    • #25
                      TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                      ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                      Hi Does anybody noticed that when SPLOUTPUT is being StdOut to HTML or PDF for spoolfile with big amount of pages, if the user decided to click "Back" (or maybe close) the IE, the SPLOUTPUT is still being StdOut. The job can be seen running under QHTTPSVR subsystem. How do we stop this job from wasting the CPU resource? regards

                      Comment


                      • #26
                        TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                        ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                        came over the error message, which i mentioned earlier. but when i click to view the spool file thro html its display empty page and thro pdf format its displaying message "file is damaged and could not be repaired" what could be the prob. thanks in advance.

                        Comment


                        • #27
                          TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                          ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                          got things right. lastly if i click on the spool file for either html or pdf file i get empty screen. in QTMHTTP Job Log i get the following message (error) Replaced object SPLLIST type *USRSPC was added to library QRPLOBJ. Replaced object SPLLIST type *USRSPC was added to library QRPLOBJ. File SPLOUTPUT in library QTEMP already exists. File SPLOUTPUT not created in library QTEMP. 151 records copied to file SPLOUTPUT in QTEMP. Buffer length longer than record for member SPLOUTPUT. Decimal data error. RPG status 00000 caused procedure WRKCGISPLF in program HAROON/WRKCGISPLF to stop. Application error. RNX9001 unmonitored by WRKCGISPLF at statement *N, instruction X'0000'. if u can suggest or help me to overcome this problem it will very nice. i wanted to see the spool file in html format at the earliest. very eager. help me out.

                          Comment


                          • #28
                            TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                            ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                            hi apagilagan once i click on the spool file to view in html/pdf format one empty screen appears. what could be the problem. In QTMHTTP in Default Server, some error is logged like " Buffer length longer than record for member SPLOUTPUT. Decimal data error." and some RPG Status 0000 caused procedure wrkcgisplf to stop. what could be the reason for Decimal data error. this message gets as soon as we try to view thro html/pdf format of the spool file. please help me out. thanks

                            Comment


                            • #29
                              TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                              ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                              I really don't have the exact solution to your problem but you can try the following: - Restart your server to recreate the SPLOUTPUT file in qtemp and then try the program again. - or, place your cursor on the message "Buffer length longer than..." and press F1 for more explanation of the message. - or, create the file SPLOUTPUT in QTEMP with record length of 382 and copy the spooled file you are trying to open into SPLOUTPUT using CPYSPLF to see if you will get the same message. Good luck.

                              Comment


                              • #30
                                TechTip: Work with CGI Spooled Files (WRKCGISPLF)

                                ** This thread discusses the article: TechTip: Work with CGI Spooled Files (WRKCGISPLF) **
                                Peter, we still cannot make ours work. Did you get yours working? We have tried many URL's like you did in your posting. Various names of HTTP servers and their ports with the colon separator and our default hTTP server is "running". We get "page cannot be displayed" instead of 404 file not found. We see our Default HTTP server has CONFIG similar to another posting. Would appreciate any direction in our endeavor.

                                Comment

                                Working...
                                X