i5_spool_list problem !

General discussion on Zend Core for IBM System i
Post Reply
hnagao
Posts: 14
Joined: Tue Dec 01, 2009 1:19 am

i5_spool_list problem !

Post by hnagao » Tue Dec 01, 2009 2:13 am

Yesterday, I tested a i5_spool_list(one of i5_ToolKits)php script. The result of test was abnormal end with MCH3601. The version of i5/OS is V6R1(Japanese DBCS with 5035 CCSID) and ZendCore for i's version is V2.6.1. It had been processing normally under the i5/OS V5R4. Is there any problem on i5/OS V6R1? Now I'm looking for the solution. help us A.S.A.P.!

darkluke980
Posts: 61
Joined: Sat Mar 28, 2009 8:31 pm
Location: Italy
Contact:

Re: i5_spool_list problem !

Post by darkluke980 » Tue Dec 01, 2009 11:23 am

Hi,

you can post your code? I will try on i5/OS V6R1.

hnagao
Posts: 14
Joined: Tue Dec 01, 2009 1:19 am

Re: i5_spool_list problem !

Post by hnagao » Wed Dec 02, 2009 2:20 am

Hi,

I tested the following code.
Please try it.

Code: Select all

<?php

print ("<html> WRKSPLF USER:<b> YAMADA </b> ");
print ("<title> SPOOL LIST</title>");
print ("<br> <hr><table border=1 cellpadding=5 cellspacing=5>");

$conn = i5_connect("LOCALHOST", "YAMADA","taro");
if (!$conn) die("<br>Connection error. error no =".i5_errno()." message=".i5_errormsg()); 
 
$desc = array(
          "username" => "YAMADA",
          "outq" => "*ALL",
          "userdata" => "*ALL"
    );

$conn1 = i5_spool_list($desc, $conn);
if (!$conn1) die("<br>commd error. error no =".i5_errno()."message=".i5_errormsg());

print '<tr>';
print '<td>'; print("<b>sSPOOL FILE NAME</b>"); print("</td>");
print '<td>'; print("<b>JOB</b>"); print("</td>");
print '<td>'; print("<b>USER</b>"); print("</td>");
print '<td>'; print("<b>JOBNBR</b>"); print("</td>");
print '<td>'; print("<b>SPOOL FILE NBR</b>"); print("</td>");
print '<td>'; print("<b>OUTQ</b>"); print("</td>");
print '<td>'; print("<b>PAGE</b>"); print("</td>");
print '<td>'; print("<b>STATUS</b>"); print("</td>");
print '<td>'; print("<b>USERDATA</b>");

/* The following information can be retrieve from i5_spool_list array. */
/*[JOBNAME][USERNAME] [JOBNBR] [SPLFNAME] [SPLFNBR] [SPLFSTAT] [DATEOPEN] */
/*[TIMEOPEN] [SCHED] [SYSTNAME] [USERDATA] [FORMTYPE] [OUTQNAME]          */
/*[OUTQLIB] [STORPOOL] [SPLFSIZE] [SPLFMULT] [PAGES] [COPILEFT] [PRIORITY]*/

$status_array = array('ZERO','RDY', 'OPN', 'CLO', 'SAV', 'WTR', 'HLD','MSGW','PND','PRT','FIN','SND','DFR');

while ($spool_list = i5_spool_list_read($conn1)) {

print '<tr>';
$stat = $status_array[$spool_list['SPLFSTAT']];
print '<td> '; print($spool_list['SPLFNAME']);  print("</td>");
print '<td> '; print($spool_list['JOBNAME']);   print("</td>");
print '<td> '; print($spool_list['USERNAME']);  print("</td>");
print '<td> '; print($spool_list['JOBNBR']);    print("</td>");
print '<td> '; print($spool_list['SPLFNBR']);   print("</td>");
print '<td> '; print($spool_list['OUTQNAME']);  print("</td>");
print '<td> '; print($spool_list['PAGES']);     print("</td>");
print '<td> '; print($stat);                  print("</td>");
print '<td> '; print($spool_list['USERDATA']);

print("</tr>");

}
print("</table><hr>");
print("</html>");

i5_spool_list_close($conn1); 

i5_close($conn);
?>

darkluke980
Posts: 61
Joined: Sat Mar 28, 2009 8:31 pm
Location: Italy
Contact:

Re: i5_spool_list problem !

Post by darkluke980 » Wed Dec 02, 2009 9:55 am

hi,

your script work fine on 6.1!

The ptf level of OS is

SF99610 8365 Installata
SF99609 28 Installata
SF99608 4 Installata
SF99601 7 Installata
SF99562 6 Installata
SF99356 6 Installata
SF99354 2 Installata
SF99187 5 Installata
SF99115 4 Installata

Try to install ZendCore 2.6.6 Update.

hnagao
Posts: 14
Joined: Tue Dec 01, 2009 1:19 am

Re: i5_spool_list problem !

Post by hnagao » Fri Dec 04, 2009 1:08 am

Hi,

My group PTF's level is following.

SF99616 4
SF99610 9111
SF99609 46
SF99601 11
SF99562 10
SF99353 11
SF99352 3
SF99115 9

All of them are newer than yours without SF99608, but I think SF99608(Group security) is not necessary.
So, I'll get the 2.6.6 update and then install and test next week. Thanks for your cooperation.

Best regars.
Last edited by hnagao on Fri Dec 18, 2009 2:59 am, edited 1 time in total.

hnagao
Posts: 14
Joined: Tue Dec 01, 2009 1:19 am

Re: i5_spool_list problem !

Post by hnagao » Thu Dec 10, 2009 12:31 am

Hi, luke. Are you fine?

I tested my script under 2.6.6 update this week. But it doesn't work. The same error MCH3601 occurred . I'm wondering why my code doesn't work under my environment and it works under yours. I believe there are no differences except some PTF level. I repeat the same code works under i5/OS V5R4. So I think it seems to be i5/OS or SLIC level error. if so, what do I have to do? Have you any idea to solve this ?

darkluke980
Posts: 61
Joined: Sat Mar 28, 2009 8:31 pm
Location: Italy
Contact:

Re: i5_spool_list problem !

Post by darkluke980 » Thu Dec 10, 2009 9:46 am

Hi,
ha you tried to change user, or other parameters (outq, userdata). Only "i5_spool_list" don't work or it is a general problem of i5 toolkit api?
What say Os/400 joblog and php job log?

hnagao
Posts: 14
Joined: Tue Dec 01, 2009 1:19 am

Re: i5_spool_list problem !

Post by hnagao » Fri Dec 11, 2009 7:29 am

Hi,

Yes, I tried to change user and other parameters. But it didn't work. This problem occured only at "i5_spool_list". Other i5 toolkit api work fine.
Apache and PHP error log have never been generated after the execution.
Only i5/OS job log says the following.(summary)

Code: Select all

MSGID     TYPE       SEV   FROM PGM    LIBRARY          TO PGM        LIBRARY
MCH3601   *ESCAPE    40    EASYCOM     ZENDCORE         EASYCOM       ZENDCORE
                                      FROM MODULE.....:     XAPI          
                                      FROM PROC.........:   EACApiCall            
                                      STATEMENT.........:   139         
                                      TO MODULE.........:   XAPI          
                                      TO PROC ............: EACApiCall            
                                      STATEMENT ........:   139         
    MESSAGE . . :   POINTER NOT SET FOR LOCATION REFERENCED.          
    CAUSE . . . . . :   A POINTER WAS USED, EITHER DIRECTLY OR AS A BASING
 			  POINTER, THAT HAS NOT BEEN SET TO AN ADDRESS. 


Do you need any other information ?

hnagao
Posts: 14
Joined: Tue Dec 01, 2009 1:19 am

Re: i5_spool_list problem !

Post by hnagao » Wed Dec 16, 2009 7:52 am

Hi,

I worked out a solution.
After I copied ZendCore 2.2.1 library from V5R4, I tried to test the same code on V6R1 installed 2.2.6. And then it works fine!

I couldn't find the cause, but my problem has been solved.

Thanks for your cooperation.

hnagao
Posts: 14
Joined: Tue Dec 01, 2009 1:19 am

Re: i5_spool_list problem !

Post by hnagao » Mon Dec 21, 2009 12:34 am

Hi,

As the joblog says, i5_spool_list is calling a ZendCore's program EASYCOM in Zendcore library, after that it failed.
So, I think it might be a problem on EASYCOM program, after I saved Zendcore library on V5R4, I restored into V6R1.
After that, i5_spool_list works same as V5R4.

Post Reply