-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathQSHONIPR04.RPGLE
More file actions
65 lines (53 loc) · 2.33 KB
/
Copy pathQSHONIPR04.RPGLE
File metadata and controls
65 lines (53 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
**FREE
Ctl-Opt DFTACTGRP(*NO) BNDDIR('QSHONI/QSHONISRV') OPTION(*SRCSTMT);
//TODO:
// Retrieve error message and CPF ID on failure if needed.
Dcl-Ds *N psds;
PROGID *PROC;
End-Ds;
Dcl-Ds qshlog;
logrecord char(1000);
End-Ds;
// Work fields
Dcl-S qt Char(1) inz('''');
Dcl-S clcmd VarChar(5000) inz('');
dcl-s rtncmd int(10);
Dcl-s msgtest Char(330) inz('');
Dcl-S cmdlin VarChar(5000) inz('');
// Include QSHONISRV service program prototypes
/copy qshoni/source,qshonisrvh
// Write to log file, crt new file and no prompt
rtncmd=QshWrtLog('This is a test': // Msg text
'INFO': // Msg type
'LOGTMP0001': // Log file
'QTEMP': // Log library
'*YES': // Recreate file
'*NO'); // Prompt the CL command
// Write to log file, append to current log. No prompt
rtncmd=QshWrtLog('''is is''ates''': // Msg
'INFO': // Msg type
'LOGTMP0001': // Log file
'QTEMP': // Log library
'*NO': // Don't recreate file
'*NO'); // Prompt the CL command
// Print the log file to an output queue
rtncmd=QshPrtLog(
'LOGTMP0001': // Log file
'QTEMP': // Log library
'*NONE': // IFS file or *NONE
'*YES': // Replace IFS file
'PRTLOG': // Log spool file name
'*SAME': // Outq LIB/OUTQ or *SAME
'*NO'); // Prompt the command
// Print the log file fo the IFS
rtncmd=QshPrtLog(
'LOGTMP0001': // Log file
'QTEMP': // Log library
'/tmp/prtlog.pdf': // IFS file or *NONE
'*YES': // Replace IFS file
'PRTLOG': // Log spool file name
'*SAME': // Outq LIB/OUTQ or *SAME
'*NO'); // Prompt the command
// Exit the program now. We're done
*inlr=*on;
return;