GITQSH - Run Qshell command line

<< Click to Display Table of Contents >>

Navigation:  Utility Commands >

GITQSH - Run Qshell command line

Description

This CL general utility command is used to run any qshell command line and capture STDOUT output to an outfile, current jobs job log or a spool file. 

 

Command Example to run directory list of the /tmp directory

GITQSH CMDLINE('cd /tmp && ls')          

               DSPSTDOUT(*NO)                    

               LOGSTDOUT(*YES)                   

               PRTSTDOUT(*NO)                    

               DLTSTDOUT(*YES)                   

 

Parameters

 

CMDLINE - Qshell command line or combination of Qshell command line options to run separated by ampersands &&.  
Example to list /tmp directory: cd /tmp && ls

 

DSPSTDOUT - Display the outfile contents. Nice when debugging. Default: *NO

 

LOGSTDOUT - Place STDOUT log entries into the current jobs job log. Use this if you want the log info in the IBM i joblog. Default: *NO - Only enable if you want to capture STDOUT to joblog and entry list is short. You can always display the OUTFILE from QTEMP as well. 

 

PRTSTDOUT - Print STDOUT to a spool file. Use this if you want a spool file of the log output. Default: *NO

 

DLTSTDOUT - This option insures that the STDOUT IFS temp files get cleaned up after processing. All IFS log files get created in the /tmp/gittemp directory. Default: *YES