{"id":27531230,"url":"https://github.com/richardschoen/gccsamples","last_synced_at":"2026-04-10T04:57:19.584Z","repository":{"id":115712190,"uuid":"322199779","full_name":"richardschoen/gccsamples","owner":"richardschoen","description":"This repository is a place for C samples created with gcc for IBM i and Linux","archived":false,"fork":false,"pushed_at":"2024-01-02T19:04:26.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-02T20:44:43.382Z","etag":null,"topics":["as400","cplusplus","gcc","ibmi","ibmioss","java","linux","node","pase","php","python","qsh","qshell"],"latest_commit_sha":null,"homepage":"","language":"C++","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}},"created_at":"2020-12-17T06:16:57.000Z","updated_at":"2024-01-02T20:44:43.383Z","dependencies_parsed_at":null,"dependency_job_id":"2e87bbb6-02cf-4cce-b33c-19cdcb6050cc","html_url":"https://github.com/richardschoen/gccsamples","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fgccsamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fgccsamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fgccsamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschoen%2Fgccsamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardschoen","download_url":"https://codeload.github.com/richardschoen/gccsamples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249526955,"owners_count":21286337,"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","cplusplus","gcc","ibmi","ibmioss","java","linux","node","pase","php","python","qsh","qshell"],"created_at":"2025-04-18T17:49:25.450Z","updated_at":"2025-12-30T21:07:25.827Z","avatar_url":"https://github.com/richardschoen.png","language":"C++","readme":"# gccsamples\nThis repository is a place for C and C++ samples created with gcc for IBM i and Linux\n\n# grepsrclib.cpp - Scan selected IBM i library source members for selected string\nBuild command:    \n```g++ grepsrclib.cpp -o grepsrclib```   \nIf you want the program to reside with the other packages from open source package management, copy the compiled object to the ```/QOpenSys/pkgs/bin``` directory. The final object path will be: ```/QOpenSys/pkgs/bin/grepsrclib```     \n\nParameters:   \n```\n-l Source library name pattern to scan\n-f Source file name pattern to scan\n-m Source member name pattern to scan\n-s String value to scan for (case insensitive)\n```\n\nSample usage to scan QCLSRC in QGPL library:   \n```grepsrclib -l \"QGPL\" -f \"QCLSRC\" -m \"*\" -s \"monmsg\"```\n\n# parmtest1.cpp - Command line parameter test program\nThis program is a good example of passing parameters to a command line C++ program.   \n\nBuild command:    \n```g++ parmtest1.cpp -o parmtest1```   \n\nParameters:   \n```\n--file  - Input file name\n--outputfile - Output file name\n```\n\nSample usage:   \n```parmtest1 --file \"/tmp/input.txt\" -outputfile \"/tmp/output.txt\"```\n\n# pingi.c - Ping using IBM i PING CL command.\nThis program is a good example of calling the PING CL command from a c program. \n\n```Useful since PASE does not have a ping command.```\n\nBuild command:    \n```gcc pingi.c -o pingi```   \n\nParameters:   \n```\nparm1 = host name or IP address to ping.\n```\n\nSample usage:   \n```pingi \"8.8.8.8\"```   \n\nResults:   \n```\nTCP3204: Verifying connection to host system 8.8.8.8.\nTCP3215: PING reply 1 from 8.8.8.8 took 11 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 2 from 8.8.8.8 took 11 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 3 from 8.8.8.8 took 11 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 4 from 8.8.8.8 took 11 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 5 from 8.8.8.8 took 11 ms. 256 bytes. TTL 60.\nTCP3211: Round-trip (in milliseconds) min/avg/max = 11/11/11.\nTCP3210: Connection verification statistics: 5 of 5 successful (100 %).\nPING ran successfully. Return code:0\n```\n\n```pingi \"8.8.8.9\"```   \n\nResults:   \n```\nTCP3204: Verifying connection to host system 8.8.8.9.\nTCP3206: No response from host within 1 seconds for connection verification 1.\nTCP3206: No response from host within 1 seconds for connection verification 2.\nTCP3206: No response from host within 1 seconds for connection verification 3.\nTCP3206: No response from host within 1 seconds for connection verification 4.\nTCP3206: No response from host within 1 seconds for connection verification 5.\nTCP3210: Connection verification statistics: 0 of 5 successful (0 %).\nPING ran successfully. Return code:0\n```\n\n```pingi \"google.com\"```\n\nResults:   \n```\nTCP3203: Verifying connection to host system google.com at address 108.177.122.138.\nTCP3215: PING reply 1 from 108.177.122.138 took 12 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 2 from 108.177.122.138 took 11 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 3 from 108.177.122.138 took 11 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 4 from 108.177.122.138 took 11 ms. 256 bytes. TTL 60.\nTCP3215: PING reply 5 from 108.177.122.138 took 11 ms. 256 bytes. TTL 60.\nTCP3211: Round-trip (in milliseconds) min/avg/max = 11/11/12.\nTCP3210: Connection verification statistics: 5 of 5 successful (100 %).\nPING ran successfully. Return code:0\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardschoen%2Fgccsamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardschoen%2Fgccsamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardschoen%2Fgccsamples/lists"}