You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API- MHR Out of Province report for Consumer Tax Branch #16725
Criteria for including MHR Registrations in the report:
• New registrations (Document Type 101)
• All MH Registration Numbers since the last program execution
• The Province entered for the Registered Location is not BC
Registration Information to be included in the report:
-MHR Registration number
-Registration Date
-Tenancy Type
-Fractional Ownership (interest for owner)
-Manufacturer
-Make
-Model
-Number of Sections
-Serial Numbers
-Year
-Circa (Y/N)
-Length
-Width
Replace existing mainframe job:
AMHRJPM1 – sequential file of all manufactured homes registered from out of province. Runs Monthly on the last workday of the month at 23:10. Report is sent to consumer taxation branch (Steven.Harrison@gov.bc.ca & Shawn.Mitchell@gov.bc.ca)
@arlentees the remaining registrations for the month of September as JSON are in a comment below. The amount of effort is the same to format as the existing text or a pdf with our report service.
And here is the updated mainframe report with the 4 registrations created after the data migration. amhrp_x8_report_240930.txt
@doug-lovett hopefully yes - I've sent another email out to them with the details of this ticket, and asked to confirm and provide an example of the report.
Putting an on-hold label until Assets can meet with the Consumer Tax Branch
Mainframe job background provided by John McColl:
The job retains the last MHREGNUM processed which is used in the subsequent execution to select only the new type 101 documents.
Here is the program mainline along with the SQL cursors for DOCUMENT, MANUHOME, LOCATION tables. I also included the SQL found in the PRODUCE_REPOR procedure which were the OWNGROUP, OWNER and DESCRIPT tables.
Just so you have a bit more of the background on the data retrieved for the report.
CALL INIT_VARIABLES;
CALL OPEN_DOCUMENT_C1;
CALL FETCH_DOCUMENT_C1;
DO WHILE (SQLCODE = SUCCESSFUL);
CALL RETRIEVE_MANUHOME_T;
IF SQLCODE = SUCCESSFUL
THEN DO;
CALL RETRIEVE_LOCATION_T;
IF SQLCODE = SUCCESSFUL
THEN DO;
IF LOCATION_T.PROVINCE ¬= 'BC'
THEN DO;
NUM_REGISTRATIONS = NUM_REGISTRATIONS + 1;
CALL PRODUCE_REPORT;
END;
END;
END;
REF_RECORD.MHREGNUM = DOCUMENT_T.MHREGNUM;
CALL FETCH_DOCUMENT_C1;
END;
OPEN_DOCUMENT_C1: PROC;
/***$$$
EXEC SQL DECLARE DOCUMENT_C1 CURSOR FOR
SELECT DOCUMTID,
MHREGNUM,
REGIDATE,
DOCUTYPE
FROM DOCUMENT
WHERE MHREGNUM > :DOCUMENT_T.MHREGNUM
AND DOCUTYPE = '101'
ORDER BY MHREGNUM
FOR FETCH ONLY
$$$***/
RETRIEVE_MANUHOME_T: PROC;
/***$$$
EXEC SQL SELECT MANHOMID,
MHREGNUM
INTO :MANUHOME_T.MANHOMID,
:MANUHOME_T.MHREGNUM
FROM MANUHOME
WHERE MHREGNUM = :DOCUMENT_T.MHREGNUM
$$$***/
RETRIEVE_LOCATION_T: PROC;
/***$$$
EXEC SQL SELECT MANHOMID,
REGDOCID,
PROVINCE
INTO :LOCATION_T.MANHOMID,
:LOCATION_T.REGDOCID,
:LOCATION_T.PROVINCE
FROM LOCATION
WHERE MANHOMID = :MANUHOME_T.MANHOMID
AND REGDOCID = :DOCUMENT_T.DOCUMTID
$$$***/
PRODUCE_REPORT: PROC;
FIRST_OWNER = ON;
CALL OPEN_OWNGROUP_C1;
CALL FETCH_OWNGROUP_C1;
DO WHILE (SQLCODE = SUCCESSFUL);
CALL OPEN_OWNER_C1;
CALL FETCH_OWNER_C1;
DO WHILE (SQLCODE = SUCCESSFUL);
CALL PRINT_OWNER_DETAIL;
CALL FETCH_OWNER_C1;
END;
CALL CLOSE_OWNER_C1;
CALL FETCH_OWNGROUP_C1;
END;
CALL CLOSE_OWNGROUP_C1;
CALL RETRIEVE_DESCRIPT_T;
IF SQLCODE = SUCCESSFUL
THEN CALL PRINT_DESCRIPTION_DETAIL;
END PRODUCE_REPORT;
OPEN_OWNGROUP_C1: PROC;
/***$$$
EXEC SQL DECLARE OWNGROUP_C1 CURSOR FOR
SELECT MANHOMID,
OWNGRPID,
REGDOCID,
TENYTYPE,
INTEREST
FROM OWNGROUP
WHERE MANHOMID = :MANUHOME_T.MANHOMID
AND REGDOCID = :DOCUMENT_T.DOCUMTID
ORDER BY MANHOMID, REGDOCID
OPTIMIZE FOR 1 ROWS
FOR FETCH ONLY
$$$***/
OPEN_OWNER_C1: PROC;
/***$$$
EXEC SQL DECLARE OWNER_C1 CURSOR FOR
SELECT MANHOMID,
OWNGRPID,
OWNERID,
OWNRNAME,
OWNRADDR,
OWNRPOCO
FROM OWNER
WHERE MANHOMID = :MANUHOME_T.MANHOMID
AND OWNGRPID = :OWNGROUP_T.OWNGRPID
ORDER BY MANHOMID, OWNGRPID, OWNERID
FOR FETCH ONLY
Activity
doug-lovett commentedon Sep 20, 2024
@arlentees can we get an example report?
arlentees commentedon Sep 20, 2024
@doug-lovett hopefully yes - I've sent another email out to them with the details of this ticket, and asked to confirm and provide an example of the report.
Putting an on-hold label until Assets can meet with the Consumer Tax Branch
doug-lovett commentedon Oct 1, 2024
Mainframe job background provided by John McColl:
The job retains the last MHREGNUM processed which is used in the subsequent execution to select only the new type 101 documents.
Here is the program mainline along with the SQL cursors for DOCUMENT, MANUHOME, LOCATION tables. I also included the SQL found in the PRODUCE_REPOR procedure which were the OWNGROUP, OWNER and DESCRIPT tables.
Just so you have a bit more of the background on the data retrieved for the report.
CALL INIT_VARIABLES;
CALL OPEN_DOCUMENT_C1;
CALL FETCH_DOCUMENT_C1;
DO WHILE (SQLCODE = SUCCESSFUL);
CALL RETRIEVE_MANUHOME_T;
IF SQLCODE = SUCCESSFUL
THEN DO;
END;
REF_RECORD.MHREGNUM = DOCUMENT_T.MHREGNUM;
CALL FETCH_DOCUMENT_C1;
END;
OPEN_DOCUMENT_C1: PROC;
/***$$$
EXEC SQL DECLARE DOCUMENT_C1 CURSOR FOR
$$$***/
RETRIEVE_MANUHOME_T: PROC;
/***$$$
EXEC SQL SELECT MANHOMID,
$$$***/
RETRIEVE_LOCATION_T: PROC;
/***$$$
EXEC SQL SELECT MANHOMID,
$$$***/
PRODUCE_REPORT: PROC;
FIRST_OWNER = ON;
CALL OPEN_OWNGROUP_C1;
CALL FETCH_OWNGROUP_C1;
DO WHILE (SQLCODE = SUCCESSFUL);
END;
CALL CLOSE_OWNGROUP_C1;
CALL RETRIEVE_DESCRIPT_T;
IF SQLCODE = SUCCESSFUL
THEN CALL PRINT_DESCRIPTION_DETAIL;
END PRODUCE_REPORT;
OPEN_OWNGROUP_C1: PROC;
/***$$$
EXEC SQL DECLARE OWNGROUP_C1 CURSOR FOR
$$$***/
OPEN_OWNER_C1: PROC;
/***$$$
EXEC SQL DECLARE OWNER_C1 CURSOR FOR
$$$***/
RETRIEVE_DESCRIPT_T: PROC;
/***$$$
EXEC SQL SELECT MANHOMID,
$$$***/
doug-lovett commentedon Oct 1, 2024
For the month of September, here are the 4 homes that are out of province and registered after the MHR data migration: