Following some instructions based on this:
https://www.itjungle.com/2022/04/11/guru-debugging-sql-stored-procedures-with-acs/
I have these two variables:
DECLARE WORK_YEAR INT;
DECLARE BREAK_YEAR INT;
According to the debugger WORK_YEAR = 2014 and BREAK_YEAR = 0.
However it does none of the lines between the IF and the END IF.
IF WORK_YEAR > BREAK_YEAR then
-- If the year subdirectory doesn't exist, create it
SELECT COUNT(*) into OBJECT_COUNT
from table(qsys2.IFS_OBJECT_STATISTICS(
start_path_name => START_PATH concat '/' concat CHAR(WORK_YEAR),
subtree_directories => 'NO'));
IF OBJECT_COUNT = 0 then
SET COMMAND = 'MD DIR(''' concat START_PATH concat '/' concat CHAR(WORK_YEAR) concat ''')';
CALL QSYS2.QCMDEXC(COMMAND);
END IF;
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com
As an Amazon Associate we earn from qualifying purchases.
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.