× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 01-Dec-2011 14:41 , James Lampert wrote:
Given this test program:

H DFTACTGRP(*NO)
H BNDDIR('QC2LE')
D PUTS PR 10I 0 EXTPROC('puts')
D STRING * VALUE OPTIONS(*STRING)
C CALLP PUTS('This is a test' + x'0d25')
C SETON LR

If I compile it here, on our box, and submit it as a batch job on
our box, I get a spool file.

If I do the same on a customer box, I either don't get a spool file,
or <<SNIP>>

Was the joblog spooled and reviewed for the job on the cust system?

I ran that program in a batch job on the PUB1 "public" v5r3 system. There the output was directed to a database file QTEMP/QPRINT that was created by the program QC2SYS via procedure "system" [as part of the processing for "puts()". Using MOVOBJ QTEMP/QPRINT *FILE MyLib in a script that had immediately before done the CALL MyPutsPgm, I inferred the create request was effected by system('*system/crtsrcpf qtemp/qprint rcdlen(266)'). DSPPFM MyLib/QPRINT after the batch job completed, I verified that the first member was used to accommodate the PUTS() request data. I am not sure why *LIBL/QPRINT printer file is not the default output device for the STDOUT by "puts", but I infer that the result was chosen to meet some expectation to act more *nix-like; perhaps because puts() includes the newline character as line-end\EOR per a Man page copied here?:
http://wiki.midrange.com/index.php/Using_QC2LE_procedures_in_ILE_RPG

However, note that... Either in interactive or in batch, the output can be forcibly directed to the QPRINT printer file, having issued OVRPRTF STDOUT QPRINT OVRSCOPE(*CALLLVL) /* HOLD(*YES) SPOOL(*YES) */ before the CALL.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.