cancel
Showing results for 
Search instead for 
Did you mean: 

Who has an Abap to show the content of iSeries OutQ's ?

Former Member
0 Kudos

Hi,

does somebody has an small abap to show the content of the iSeries OUTQs oder perhaps for the status of the QUEUE?

Best Regards,

Carsten Schulz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Cartsen,

Not sure about abap, but perhaps defining a command via sm69, e.g. wrkoutq outq(qprint) and executing it via sm49 is an option for you.

Best,

Bernd

Former Member
0 Kudos

Hi,

yes of course a host command. But I want to show the spoolfile in an abap report.

Additional I want to create an emegency program to stop and restart a jammed iseries OutQ.

best regards,

Carsten Schulz

Former Member
0 Kudos

I'd code that emergency pgm with CL at OS level.

Best,

Bernd

Former Member
0 Kudos

Hi,

ok. Thats fine.

But how can a enduser in SAP see what happens?

First I thought I make a program which is running all the time and starts all remote OutQs on OS/400.

But I think this is not a good idea, if a job is actually printing, this job will be cut down.

best regards,

Carsten Schulz

Answers (1)

Answers (1)

Former Member
0 Kudos

We've setup a command in SM69 simply named ZWRKOUTQ with command WRKOUTQ. It can be called from ABAP using the function module SXPG_COMMAND_EXECUTE.

Here is the code:

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

EXPORTING

COMMANDNAME = COMMAND1

ADDITIONAL_PARAMETERS = PARM

  • OPERATINGSYSTEM = SY-OPSYS

TARGETSYSTEM = PAHOST

  • DESTINATION =

  • STDOUT = 'X'

  • STDERR = 'X'

  • TERMINATIONWAIT = 'X'

  • TRACE =

IMPORTING

STATUS = STATUS

  • EXITCODE =

TABLES

EXEC_PROTOCOL = ITAB

  • EXCEPTIONS

  • NO_PERMISSION = 1

  • COMMAND_NOT_FOUND = 2

  • PARAMETERS_TOO_LONG = 3

  • SECURITY_RISK = 4

  • WRONG_CHECK_CALL_INTERFACE = 5

  • PROGRAM_START_ERROR = 6

  • PROGRAM_TERMINATION_ERROR = 7

  • X_ERROR = 8

  • PARAMETER_EXPECTED = 9

  • TOO_MANY_PARAMETERS = 10

  • ILLEGAL_COMMAND = 11

  • WRONG_ASYNCHRONOUS_PARAMETERS = 12

  • CANT_ENQ_TBTCO_ENTRY = 13

  • JOBCOUNT_GENERATION_ERROR = 14

  • OTHERS = 15

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT ITAB.

IF itab-f1 eq 1 or itab-f1 eq 6.

WRITE:/ itab-f3.

endif.

ENDLOOP.

-


COMMAND1 = ZWRKOUTQ

PARM = PRINTER NAME

PAHOST = first part of the PAMSSERVER from table TSP03D

STATUS LIKE BTCXP3-EXITSTA

DATA: BEGIN OF ITAB OCCURS 10,

F1(1),

F2(2),

F3(147),

END OF ITAB.

You can use that function module to do stop and start as well by defining the commands in SM69.

thanx

Mark