{"id":27531234,"url":"https://github.com/richardschoen/ibmibashscripts","last_synced_at":"2025-04-18T17:49:31.610Z","repository":{"id":115712259,"uuid":"278477383","full_name":"richardschoen/ibmibashscripts","owner":"richardschoen","description":"Bash Scripts for use in PASE, QShell on IBM i ","archived":false,"fork":false,"pushed_at":"2024-09-14T14:54:07.000Z","size":81,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-15T00:37:33.877Z","etag":null,"topics":["as400","automation","bash","clp","ibmi","pase","qshell","rpgle","scripts","ssh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richardschoen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-09T21:44:44.000Z","updated_at":"2024-09-14T14:54:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0a37441-7e94-4cb8-b35f-baae65df0293","html_url":"https://github.com/richardschoen/ibmibashscripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fibmibashscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fibmibashscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fibmibashscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fibmibashscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardschoen","download_url":"https://codeload.github.com/richardschoen/ibmibashscripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249526979,"owners_count":21286341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["as400","automation","bash","clp","ibmi","pase","qshell","rpgle","scripts","ssh"],"created_at":"2025-04-18T17:49:30.985Z","updated_at":"2025-04-18T17:49:31.594Z","avatar_url":"https://github.com/richardschoen.png","language":"Shell","readme":"# ibmibashscripts\nThis repository will be a home for useful bash scripts on IBM i.\n\nThis is a learning experience so gentle feedback and your favorite IBM i bash examples would be nice to put here.\n\nOne thing you will notice is that I like verbose documentation :-)\n\nFeel free to submit requests or input in the Issues section as well\n\n## ibmibashtemplate.sh\nThis bash script can serve as a good starter template for your bash scripts. \n\n## savlibifs.sh\nSave IBM i Library to IFS based Save File\n\n## rstlibifs.sh\nRestore IBM i Library from IFS based Save File\n\n## Editing IBM i Source Members using Visual Studio Code or other editors\nIBM i developers who are using Visual Studio Code, Notepad++ and other PC based editors to edit source code can now more easily edit source members that originate from an IBM i source file. Library based source members can be quickly copied to an IFS file so they can be edited out of the IFS.\n\nThe **cpysrctoifs.sh** bash script can be used to quickly copy a library based source member to an IFS file where it can be directly edited with VS Code, etc. Simply change to the directory where the source member resides and run the script with the source member IFS file name.\n\nExample to copy a source file member from QGPL/QCLSRC(SAMPLE), Type: CLP to relative IFS output path for editing \n```\nSample bash/PASE command line sequence to copy from source file to IFS location:\ncd /gitrepos/QGPL/QCLSRC\ncpysrctoifs.sh SAMPLE.CLP\n\nNote: Once your current directory is set to the appropriate directory in the terminal (via cd /dirpath)   \nyou don't need to use the cd operation again until you want to change to another source directory in the IFS.\n```\n\n:exclamation: ***Make things even easier. Skip typing the .sh at runtime***\n```\nFirst, create a symbolic link to cpysrctoifs.sh in /QOpenSys/pkgs/bin pointing to your script directory (mine is /ibmibashscripts): \nln -s /ibmibashscripts/cpysrctoifs.sh /QOpenSys/pkgs/bin/cpysrctoifs\n\nSample bash/PASE command line sequence to copy from IFS location to source file:\ncd /gitrepos/QGPL/QCLSRC\ncpysrctoifs SAMPLE.CLP\n```\n\nThe **cpyifstosrc.sh** bash command can be used to copy an IFS file edited by VS Code, etc back to a library based source member after editing. Simply change to the directory where the source member resides and run the script with the source member IFS file name.\n\nExample to copy an IFS file named: /gitrepos/QGPL/QCLSRC/SAMPLE.CLP to source file member QGPL/QCLSRC(SAMPLE), Type: CLP to relative IFS output path for editing\n```\nSample bash/PASE command line sequence to copy from IFS location to source file:\ncd /gitrepos/QGPL/QCLSRC\ncpyifstosrc.sh SAMPLE.CLP\n\nNote: Once your current directory is set to the appropriate directory in the terminal (via cd /dirpath)   \nyou don't need to use the cd operation again until you want to change to another source directory in the IFS.\n```\n\n:exclamation: ***Make things even easier. Skip typing the .sh at runtime***\n```\nFirst, create a symbolic link to cpyifstosrc.sh in /QOpenSys/pkgs/bin pointing to your script directory (mine is /ibmibashscripts): \nln -s /ibmibashscripts/cpyifstosrc.sh /QOpenSys/pkgs/bin/cpyifstosrc  \n\nSample bash/PASE command line sequence to copy from IFS location to source file:\ncd /gitrepos/QGPL/QCLSRC\ncpyifstosrc SAMPLE.CLP\n```\n\n## cpysrctoifs.sh - Copy Source Member from Library to IFS File\nEasily copy source member to IFS file path from library with minimal parameter entry for editing with Visual Studio Code, Notespad++ or other editors that can open and save IFS files.\n\n**P1** - Destination IFS file name (no dir path needed) entered in bash or other PASE shell. Source from library/file.member is automatically derived from the IFS directory path structure.  \n(Ex: /gitrepos/srclibrary/srcfile/srcmember.srctype = Source Library: srclibrary, Source File: srcfile, Source member: srcmember, Source type: srctype )  \nNote: The IFS directory used, does NOT have to be a Git repository unless you are using Git in the IFS.  \n\n**P2-Optional** - Replace destination IFS file. [Y/N] Default :Y\n\nExample to copy a source file member from QGPL/QCLSRC(SAMPLE), Type: CLP to relative IFS output path for editing \n```\nSample bash/PASE command line sequence to copy from source file to IFS location:\ncd /gitrepos/QGPL/QCLSRC\ncpysrctoifs.sh SAMPLE.CLP\n\nNote: Once your current directory is set to the appropriate directory in the terminal (via cd /dirpath)   \nyou don't need to use the cd operation again until you want to change to another source directory in the IFS.\n```\n\n## cpyifstosrc.sh - Copy IFS File to Source Member in Library\nEasily copy IFS source member to source member in library with minimal parameter entry after editing with Visual Studio Code, Notepad++ or other editors that can open and save IFS file. \n\n**P1** - From IFS file name (no dir path needed) entered in bash or other PASE shell. Source from library/file.member is automatically derived from the IFS directory path structure.  \n(Ex: /gitrepos/srclibrary/srcfile/srcmember.srctype = Source Library: srclibrary, Source File: srcfile, Source member: srcmember, Source type: srctype )  \nNote: The IFS directory used, does NOT have to be a Git repository unless you are using Git in the IFS.  \n\n**P2-Optional** - Replace source member in library. [Y/N] Default :Y\n\nExample to copy an IFS file named: /gitrepos/QGPL/QCLSRC/SAMPLE.CLP to source file member QGPL/QCLSRC(SAMPLE), Type: CLP to relative IFS output path for editing\n```\nSample bash/PASE command line sequence to copy from IFS location to source file:\ncd /gitrepos/QGPL/QCLSRC\ncpyifstosrc.sh SAMPLE.CLP\n\nNote: Once your current directory is set to the appropriate directory in the terminal (via cd /dirpath)   \nyou don't need to use the cd operation again until you want to change to another source directory in the IFS.\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardschoen%2Fibmibashscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardschoen%2Fibmibashscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardschoen%2Fibmibashscripts/lists"}