Sky Chu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 2022, 中油IT交流區 2022/7/29 企業大型主機何去何從(5之4) 模式一 :直接採購新系統 模式二 :Re-Host到開放平台 模式三 :Re-Architect應用系統 https://www.ibm.com/blogs/think/tw-zh/2019/09/23/large-enterprise-part4/ 2022/7/21 1.請問主機上的RACF(Resource Access Control Facility),換到OPEN環境後,用什麼技術取代? 1.1 Resource Access Control Facility (RACF) is a provides the tools to help the installation manage access to critical resources. Resource Access Control Facility works with the System Authorization Facility that provides Access Control and auditing functionality for the MVS operating systems. 1. Identification and verification of a user via UserId and password check (authentication) 1. Identification, classification and protection of system resources 1. Maintenance of access rights to Protected Resources (authorization) 1. Control the means of access to Protected Resources 1. Logging of accesses to a protected system and Protected Resources (auditing) ![](https://i.imgur.com/WtFgyGw.png) OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. ![](https://i.imgur.com/vdlYq0W.png) 2022/7/21 1.請問 Spring Framework (或Spring Batch)可以取代IBM主機上Management TIER的工作嗎?如Scheduler , Source control , security , printing … A1.1. Spring Batch:以Scheduler為主,要搭配TMS比較好用 ![](https://i.imgur.com/Ks3CExa.png) ![](https://i.imgur.com/2e3ae2j.png) ![](https://i.imgur.com/7NnRxax.png) A1.2. Source control:建議使用git ![](https://i.imgur.com/RRTjTO9.png) A1.3. security 硬體firewall應該還是比較好,軟體上可以加一些EDR軟體如下 ![](https://i.imgur.com/S577HaV.png) A1.4. printing 可以用itext來套版 ![](https://i.imgur.com/dJtPbmh.png) 2022/7/18 1. [**上課PPT**](https://vghteams-my.sharepoint.com/:b:/g/personal/ycchu5_vghtpe_gov_tw/ESaZVR02cs9Hsany7exGabwB_-nDr8bUsty2d68WSlAQiw?e=ddtaAh) 2. 期未報告, [**作業上傳區**](https://vghteams-my.sharepoint.com/:f:/g/personal/ycchu5_vghtpe_gov_tw/ErEq9HKOsAxInzleXS2bHwgB-EtsOOqSkMjTazPRtZnKcw?e=ceJBcy) 因資訊再造範圍很大且困難,提供各位同學以PTT(10頁左右)方式繳交, 請選擇自己開發或維護系統為主題做專題報告。 > 本次學員計40名,包括資訊處資一組資二組、系統組;煉製事業部應用服務組、系統組、煉製部桃園廠、煉製部大林廠,探採事業部的同仁及組長。 > 分組報告(可以是**開發、系統及網路**合作) > > 報告重點:**(1)核心技術、(2)系統規模、(3)系統流程、與(4)傳統技術比較、(5)再造後如何提升使用者有感服務**。 > 報告順序: > 1組.資訊處資一組及作業組(8位)。 > 2組.資訊處資二組及作業組(8位)。 > 3~4組 煉製事業部應用服務組系統服務組(18位)。 > 5.煉製部桃園廠(2位) > 6.煉製部大林廠(2位) > 7.探採事業部(2位) > 其中5-7可以加入1~4組。 2022/7/13 1. Q1. 從舊有主機的環境轉換到目前使用的系統架構,當在新的系統架構進行交易(新增、修改)時,筆數超過一定數量時,是否曾經在遇過效能瓶頸的情形 ?? 1. A1.1. DB2 資料表要先把index定下來, 每一張表都要有PK A1.2. 我們有超大的表,我們是建立Partitioned tables, 建議用月份切,UDORDER資料,期望保留10年。 > UDORDER改為PARTITION架構,有10個PARTS, > 用UDPARNO之值(住院號末二位)來切割擺放, > PARTITION BY (UDPARNO) > (PARTITION 1 ENDING AT ('09'), > PARTITION 2 ENDING AT ('19'), > PARTITION 3 ENDING AT ('29'), > PARTITION 4 ENDING AT ('39'), > PARTITION 5 ENDING AT ('49'), > PARTITION 6 ENDING AT ('59'), > PARTITION 7 ENDING AT ('69'), > PARTITION 8 ENDING AT ('79'), > PARTITION 9 ENDING AT ('89'), > PARTITION 10 ENDING AT ('99')); > Q2. 舊有的 Z/OS DB2 編碼為 EBCDIC到新的 Linux DB2 使用何種編碼 ?? 有沒有遇到亂碼需要修正的問題 ?? A2.1. 新的table, 要開UTF-8, 過去的時候, 如果有難字要在新table重定難字, 不然會出現亂碼; 另外長度建議要開3倍。 A2.2. 我們也發現SAS用MS950的連線寫進資料庫是UTF8,但是若是遇到難字,就無法寫入。 ![](https://i.imgur.com/XB3quUe.png) 2022/7/20 Q3. 不知是否有用VSAM當資料庫的系統?若這些VSAM無法改設計成table,是否有解決方法? A3.1.因應未來平台轉換需求,主機電腦STORED PROCEDURE 一律改以SQL 語法為主(除非特別需求,如要抓取主機VSAM 檔可使用 PL/I或cobol語言外,否則一律使用SQL 語法)。 A3.2.Open DB2新功能提供撰寫SQL stored procedure 像create table 一樣簡單,不用compile,直接define 即可。 請大家多多利用: > > 1. SOURCE : 集中放在VGHTPE.DB2TS.SPDEF > > 請看範例(純SOURCE):VGHTPE.DB2TS.SPDEF($$SAMPLE) > > 範例(兼說明):VGHTPE.DB2TS.SPDEF($$SAMPL1) > > CREATE JCL: VGHTPE.DB2TS.SPDEF($CREPROC) > > > > 2. PRODUCTION CHANGE上版: > > 先COPY 至VGHTPE.DB2EQ.SPDEF,修改授權對象及相關SCHEMA NAME(如VGHTPETS->VGHTPEVG) 後, > > 首次新建 : 填單請系統組處理。 > > 後續異動 : 可自己搬遷, 程序如下: > > TSO ISPF->D:DB2->DB2VG-> (CREATE SQL STORED PROCEDURE) 輸入MEMBER NAME 即可。 > 3.考慮STORED PROCEDURE 為很多程式公用之目的,設計時請要注意精簡及效能原則. >4. 參考書:IBMBOOKS : DB2 10 for z/OS 「SQL REFERENCE 」 Q4. WAS為什麼沒放在LinuxOne上,而是放在Windows NT上? A4.1. 我們是直接安裝到windows 2012,我們沒有買LinuxOne,而是用x86,以VMware方式,建立cluster。 Q5. 轉過去LinuxOne後,程式過版有分前、後端嗎? 因EGL,會有WAS端過版JSP,zOS端過版LoadModule的狀況,導致前後端時間不一致。 A5.1. 我們以JAVA開發,有套用SPRING,以MVC開發 模型(Model)、視圖(View)和控制器(Controller) ![](https://i.imgur.com/HOVpm1F.png) ![](https://i.imgur.com/hmkGpdQ.png) A5.2 以SPIRNG MVC開發,因有SPIRNG控制,不會出現這個問題 ![](https://i.imgur.com/vawK7Gi.png) Q6 承Q5問題,若你們用java改寫後,邏輯全放在WAS端,DB2僅做DB。 那DB2的Bind動作,還會做嗎? 透過Bind才能獲取最佳SQL的access path,還會有此功能嗎? A6.1 在開放端Java程式需讀UDPDP00表格(開放端)及病人計價身分床位等級(主機端)等資訊,是否需2個connection分讀上述資料庫 A6.2 Db2相關 TWO_PHASE_COMMIT 在設定上, 主要是以相對的系統參數上需要調整, ALTER SERVER xxxxxx OPTIONS (SET DB2_TWO_PHASE_COMMIT 'Y'); A6.3. (1)若同一個connection上有同時更新兩端的資料庫:會有two phase commit的問題 (2)若一個connection上只有異動主機端的資料庫資料:沒有two phase commit的問題。 (3)若一個connection上只有異動開放端的資料庫資料:沒有two phase commit的問題。 (註:若是用二個connection去分別存取兩端資料庫,rollback問題應該更難處理吧?) Q7.上課提到主機DB2轉到 OPEN DB2,採用UNICODE編碼長度需擴充至3倍,但根據之前DB2轉SQL資料庫經驗 eg. DB2 char(10) 轉成 SQL nchar(10),SQL可以容納的字數會比DB2多,是不需要去改程式定義的,是否可以了解原因。 A7.1. ``` nchar nvarchar      儲存單位 : 2 Bytes(Unicode) ``` nchar[(n)]  n必須是1到4000的值。 nvarchar[(n|max)]  n可以是1到4000之間的值。 max表示儲存體大小上限, 2^31-1 個位元組(2 GB) nchar和nvarchar的差異與char和varchar相同,而多了一個n, 不同點在於nchar和nvarchar是以unicode的方式儲存資料, 若儲存的資料不限於英文,建議都以n開頭的欄位型態為主。 舉例來說,若現在要在nvarchar(50)的欄位中,儲存「我愛Taiwan」 這樣總共占了8 * 2bytes = 16bytes的空間, 可知就算1byte的英文字,寫入nvarchar的欄位時,還是以2bytes的方式儲存。 總結 當要開資料表欄位時,要以儲存的資料為考量, 決定要以哪種資料型態為主 一般建議如下 char 資料有固定長度,並且都為英文數字。 nchar 資料有固定長度,但不確定是否皆為英文數字。 varchar 資料沒有固定長度,並且都為英文數字。 nvarchar 資料沒有固定長度,且不確定是否皆為英文數字。 Q8.以往開發經驗會把業務邏輯放在程式碼物件裡,而且 Store Procedure 維護業務邏輯上並不易, 請問會將一些邏輯和程式碼放在 Store Procedure的考量點為何? A8.1 如果是核心程式(跟$有關),而且要一口氣執行完,我們還是維持原本的方式。 A8.2 如果不是,我們想辦法切割出來,如核心和非核心 如: > 1. 首日量帳務: > 1. 呼叫UDPAT00(QRY030)(此程序應很前面就呼叫)。 > 2. 呼叫UDCALQN0(BIZ150)。 > 3. 呼叫UDLRXID0(BIZ210)。 > 4. 呼叫UDCHARG0(BIZ220)。 > 5. 注射費:若BIZ220輸出參數XCHARGE1>0,則要呼叫UDBILO00(TBL010), > TBL010參數TTABNAM給’BILORDER’值, > TBL010參數TPFCOD是帶BIZ220輸出參數TPFINJ值, > TBL010參數TQTY是帶BIZ220輸出參數TORQTY值。 > 6. 材料費:若BIZ220輸出參數XCHARGE2>0,則要呼叫TBL010, > TBL010參數TTABNAM給’BILORDER’值, > TBL010參數TPFCOD是帶BIZ220輸出參數TPFMAT值, > TBL010參數TQTY是帶BIZ220輸出參數TMAQTY值。 > 7. 呼叫UDTPNCH0(TBL020)。 > 8. 藥服費:若TBL020輸出參數TPHQTY>0,則要呼叫UDBILO00(TBL010), > TBL010參數TTABNAM給’BILMINPT’值, > TBL010參數TFREQN給’ONCE’值, > TBL010參數TPFCOD是帶TBL020輸出參數TPHPFCD值, > TBL010參數TQTY是帶TBL020輸出參數TPHQTY值。 > 9. 進UDORDER(UD醫令):呼叫UDDMORD0(TBL030), > TBL030參數XCHARGE1是帶BIZ220輸出參數XCHARGE1值, > TBL030參數XCHARGE2是帶BIZ220輸出參數XCHARGE2值, > TBL030參數TCHARGE是帶BIZ220輸出參數TCHARGE值。 範例: ``` 1. STORE PROCEDURE NAME:UDATORD0。 2. 病人之有效處方UDORDER清單(UDMFDSP2)改寫。 3. 輸入資料: TSYSD 系統別 VARCHAR(05)ADMUD,ADMCM... TNURSTA 病房 VARCHAR(04) TCASE 住院號 VARCHAR(08) 4. 輸出資料: RET INTEGER 結果異常代碼 RETMSG CHAR(60) 結果異常說明 RESULT SET UDATORD0,病人之有效處方清單表格 ``` ``` CALL VGHTPETS.UDATORD0( -- Enter values below Parameter name Mode Data type 'ADMCM' , -- TSYSD IN VARCHAR(5) 'A093' , -- TNURSTA IN VARCHAR(4) '09065380' , -- TCASE IN VARCHAR(8) ? , -- RET OUT INTEGER ? ) -- RETMSG OUT CHAR(60) ``` ``` 1. STORE PROCEDURE NAME:UDEDIT0。 2. 處方編輯天數、頻次、途徑、劑量、單次最大劑量(UDPRESCR)改寫。 { "UDCASENO":"09030639", "eventcode":"500", "001":"U01-2", "002":"U01-2", "aaTITLE":[ "IICASENO", "IIDLINO", "IIFUNC", "IIDRGNO", "IIDOSAGE", "IIMAXD", "IIFREQN", "IIROUTE", "IIDURAT", "IIDURA0", "IICHEMO", "IICNT02", "IISELF", "UDFRQATR", "UDINJNUM", "UDSCHPA1" ], "aaData":[ [ "09030639", "001", "N", "80050", "500", "00002500", "QD", "IVD", "099", "014", "", "", "N", "N", "0001", "", "0930-" ], [ "09030639", "002", "N", "04862", "1", "00000005", "QD", "IVA", "099", "014", "", "", "N", "N", "0001", "", "0930-" ], [ "09030639", "003", "N", "04579", "5", "00000040", "QD", "IVA", "003", "014", "", "", "N", "N", "0001", "", "0930-" ], [ "09030639", "004", "N", "00806", "0.5", "00000014", "Q8H", "IVA", "003", "014", "", "", "N", "N", "0003", "", "0100-0930-1700-" ], [ "09030639", "005", "N", "00126", "0.25", "00000004", "Q4HPRN", "IVA", "014", "014", "", "", "N", "P", "0006", "", "0000-0000-0000-0000-0000-0000-" ], [ "09030639", "006", "N", "03600", "1", "00000003", "Q2HPRN", "PO", "014", "014", "", "", "N", "P", "0012", "", "0000-0000-0000-0000-0000-0000-0000-0000-0000-0000-0000-0000-" ], [ "09030639", "007", "N", "03795", "800", "00006000", "NOON", "IVA", "002", "014", "Y", "", "N", "N", "0001", "", "1200-" ], [ "09030639", "008", "N", "80050", "500", "00002500", "NOON", "IVD", "002", "014", "", "", "N", "N", "0001", "", "1200-" ] ] } ``` ![](https://i.imgur.com/hOwR0E3.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully