-- SelectJobStatus=
SELECT
  *
FROM
  FW_JOB_BASE
WHERE
  ENTRY_DATE_TIME <= /*:EntryDateTime*/TO_TIMESTAMP('20140101122334', 'YYYYMMDDHH24MISS')
  AND EXEC_HOST = /*$HostName*/''
ORDER BY
  JOB_SEQ
FOR UPDATE
;
-- SelectNextVal=
SELECT NEXTVAL ('SQ_JOB')
;
-- SelectJobStatusById=
SELECT
  *
FROM
  FW_JOB_BASE
WHERE
  JOB_SEQ = /*:JobSeq*/123
;
-- UpdateJobStatus=
UPDATE
  FW_JOB_BASE
SET
  STATUS = /*:Status*/1,
  EXEC_HOST = /*:HostName*/'',
  MESSAGE = /*:Message*/''
WHERE
  JOB_SEQ = /*:JobSeq*/123
;
-- SelectJobStatusList=
SELECT
  *
FROM
  FW_JOB_BASE
WHERE
  STATUS IN /*$Status*/(10, 11)
  AND EXEC_HOST = /*$HostName*/''
ORDER BY
  ENTRY_DATE_TIME,
  JOB_SEQ
;
-- DeleteJobStatus=
DELETE FROM
  FW_JOB_BASE
WHERE
  JOB_SEQ = /*:JobSeq*/123
;
-- InsertJobStatus=
INSERT INTO
  FW_JOB_BASE
(
--<JobSeq
  JOB_SEQ,
-->
  JOB_ID,
  JOB_NAME,
  ENTRY_USER_ID,
  ENTRY_DATE_TIME,
  ENTRY_IP,
  JOB_PARAM,
  BAT_PARAM,
  DISP_PARAM,
  EXEC_HOST,
  STATUS,
  REMARK
) VALUES (
--<JobSeq
  /*:JobSeq*/123,
-->
  /*:JobId*/222,
  /*:JobName*/'',
  /*:EntryUserId*/'',
  /*:EntryDateTime*/TO_TIMESTAMP('20140101122334', 'YYYYMMDDHH24MISS'),
  /*:EntryIp*/'',
  /*:JobParam*/'',
  /*:BatParam*/'',
  /*:DispParam*/'',
  /*:HostName*/'',
  /*:Status*/0,
  /*:Remark*/''
)
;
