Skip to content

Commit

Permalink
Merge pull request #27 from tom-writes-code/save-snippets-to-session-…
Browse files Browse the repository at this point in the history
…user

Save snippets to session user
  • Loading branch information
tom-writes-code authored Apr 21, 2022
2 parents cb8cc30 + cc80fe8 commit 3dd89e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rpgle/REPL_PSEU.SQLRPGLE
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ dcl-proc storeLineOfPseudoCode export;
INSERT INTO replsrc
(owner, session_id, line_number, code, last_update)
VALUES
(CURRENT USER,
(SESSION USER,
(QSYS2.JOB_NAME),
:lineOfCode.line,
:lineOfCode.code,
Expand Down Expand Up @@ -457,13 +457,13 @@ dcl-proc storeSessionToSaveFile export;

exec sql
DELETE FROM replsrc
WHERE owner = CURRENT USER
WHERE owner = SESSION USER
AND save_name = :saveFile;

exec sql
INSERT INTO replsrc
(line_number, code, save_name, last_update, owner)
SELECT line_number, code, :saveFile, CURRENT TIMESTAMP, CURRENT USER
SELECT line_number, code, :saveFile, CURRENT TIMESTAMP, SESSION USER
FROM replsrc
WHERE session_id = (QSYS2.JOB_NAME);

Expand All @@ -483,7 +483,7 @@ dcl-proc restoreSaveFileToSession export;
INSERT INTO replsrc
(line_number, code, session_id, last_update, owner)
SELECT line_number, code, (QSYS2.JOB_NAME),
CURRENT TIMESTAMP, CURRENT USER
CURRENT TIMESTAMP, SESSION USER
FROM replsrc
WHERE owner = :owner
AND save_name = :saveFile;
Expand Down Expand Up @@ -511,7 +511,7 @@ dcl-proc restoreSessionToSession export;
INSERT INTO replsrc
(line_number, code, session_id, last_update, owner)
SELECT line_number, code, (QSYS2.JOB_NAME),
CURRENT TIMESTAMP, CURRENT USER
CURRENT TIMESTAMP, SESSION USER
FROM replsrc
WHERE session_id = :sessionId;

Expand Down

0 comments on commit 3dd89e5

Please sign in to comment.