This CL general utility command is used to query a list of source members by source library, file and source change date ranges. The command is used by the LIBSRCEXP command to export library source members.
Command Example to run directory list of the /tmp directory
LIBRARY - The library to list source members for. Only source physical files will be listed.
FILE - Source physical file to list. Default - *ALL
Specific source file name
*ALL - include all source files from selected library.
STARTDATE - Start date to query. Default - *TODAY
Specific start date in MMDDYYYY format. Ex: 01011990
*ALL - Start date set to 0101990 and end date auto-set to 01012099.
*TODAY - Use today's date. Gets everything between 12:00am and 11:59pm on current date.
*YESTERDAY - Use yesterday and today's date. Gets everything between 12:00am on the previous date through 11:59pm on current date.
*CURMONTH - Use the current month beginning and ending date. This is NOT a rolling 30 days. It is hard locked to the current month.
*LAST7 - Get the last 7 days plus the current date through 11:59pm. This is a rolling 7 days. Good for scheduling regular commits.
*LAST14 - Get the last 14 days plus the current date through 11:59pm. This is a rolling 14 days. Good for scheduling regular commits.
*LAST30 - Get the last 30 days plus the current date through 11:59pm. This is a rolling 30 days. Good for scheduling regular commits.
ENDDATE - Start date to query. Default - *STARTDATE
Specific end date in MMDDYYYY format. Ex: 01011990
*STARTDATE - Start date setting will determine end date unless a specific date is entered for the end date.
OUTFILE - The output physical file created from the SQL query.
EMPTYERROR - The command will throw a CPF9898 escape message when no records are found. If this option is not used, there is a data area named SQLQRYCNT that gets created in QTEMP with the last query record cound. You can use this data area if you don't want to throw an escape message when no records selected from the query. Default - *YES
*NO - Do not throw an escape message on empty query results file. Use SQLQRYCNT data area in QTEMP if you need to check for query results in this case.
*YES - Throw a CPF9898 error message if no records were returned from the query. This message is an escape message that must be monitored for in RPG or CL programs as needed.
QRYPROMPT - The query prompt setting can be used to see the actual SQL being passed to the data query by GITQRYSRC. Default - *NO
*NO - Don't prompt for query. This would be used unless troubleshooting.
*YES - Prompt for query. Use this option to see the actual SQL being passed to the data query by GITQRYSRC.