{"id":26878177,"url":"https://github.com/armanbhatia0100/cobol_employee_management_program","last_synced_at":"2026-02-13T11:48:13.328Z","repository":{"id":285330620,"uuid":"957754343","full_name":"ArmanBhatia0100/COBOL_Employee_Management_Program","owner":"ArmanBhatia0100","description":"This COBOL program, EMPLOYEE-MANAGEMENT-PROGRAM, allows users to input employee data, store it in an external file, and then display a formatted table of employees with 10.5 or more years of service. It’s a simple demonstration of file I/O and data processing in COBOL.","archived":false,"fork":false,"pushed_at":"2025-03-31T04:23:16.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T05:24:57.180Z","etag":null,"topics":["cobol","cobol-language","cobol-programs","db2","ibm","jcl"],"latest_commit_sha":null,"homepage":"","language":"COBOL","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/ArmanBhatia0100.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":"2025-03-31T04:20:02.000Z","updated_at":"2025-03-31T04:25:13.000Z","dependencies_parsed_at":"2025-03-31T05:25:05.250Z","dependency_job_id":"b4533f22-2bc1-42d6-8ae8-061b7d37800c","html_url":"https://github.com/ArmanBhatia0100/COBOL_Employee_Management_Program","commit_stats":null,"previous_names":["armanbhatia0100/cobol_employee_management_program"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmanBhatia0100%2FCOBOL_Employee_Management_Program","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmanBhatia0100%2FCOBOL_Employee_Management_Program/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmanBhatia0100%2FCOBOL_Employee_Management_Program/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmanBhatia0100%2FCOBOL_Employee_Management_Program/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArmanBhatia0100","download_url":"https://codeload.github.com/ArmanBhatia0100/COBOL_Employee_Management_Program/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465249,"owners_count":20781919,"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":["cobol","cobol-language","cobol-programs","db2","ibm","jcl"],"created_at":"2025-03-31T12:19:45.199Z","updated_at":"2026-02-13T11:48:08.280Z","avatar_url":"https://github.com/ArmanBhatia0100.png","language":"COBOL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Employee Management Program\r\n\r\n## Overview\r\nThis COBOL program, `EMPLOYEE-MANAGEMENT-PROGRAM`, allows users to input employee data, store it in an external file, and then display a formatted table of employees with 10.5 or more years of service. It’s a simple demonstration of file I/O and data processing in COBOL.\r\n\r\n## Features\r\n- Collects employee information interactively from the user:\r\n  - Employee ID (6 digits)\r\n  - Department Code (3 digits)\r\n  - First Name (up to 20 characters)\r\n  - Last Name (up to 20 characters)\r\n  - Years of Service (e.g., 20.5)\r\n- Writes the data to `EMPLOYEE-FILE.txt`.\r\n- Reads the file and displays a formatted table of employees with 10.5+ years of service.\r\n- Includes a header and separator line for the output table.\r\n\r\n## Prerequisites\r\n- A COBOL compiler (e.g., GnuCOBOL or IBM Enterprise COBOL).\r\n- A compatible environment to run COBOL programs (e.g., Linux, Windows with GnuCOBOL, or a mainframe).\r\n- Write permissions in the parent directory for creating `EMPLOYEE-FILE.txt`.\r\n\r\n## File Structure\r\n### Output/Input File\r\n- **`EMPLOYEE-FILE.txt`**  \r\n  - Format: Line-sequential  \r\n  - Record Structure:\r\n    - Employee ID (6 digits)\r\n    - Department Code (3 digits)\r\n    - First Name (20 chars, alphabetic)\r\n    - Last Name (20 chars, alphabetic)\r\n    - Years of Service (3 digits, 2 before decimal, 1 after, e.g., 20.5)  \r\n  - Example:\r\n    ```\r\n    123456123John                 Smith                 015\r\n    789123456Jane                 Doe                   012\r\n    ```\r\n\r\n## Installation\r\n1. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/ArmanBhatia0100/employee-management-program.git\r\n   ```\r\n2. Ensure the program has access to the parent directory (or adjust the file path in the `FILE-CONTROL` section).\r\n3. Compile the COBOL program:\r\n   ```bash\r\n   cobc -x EMPLOYEE-MANAGEMENT-PROGRAM.cbl\r\n   ```\r\n\r\n## Usage\r\n1. Run the compiled program:\r\n   ```bash\r\n   ./EMPLOYEE-MANAGEMENT-PROGRAM\r\n   ```\r\n2. Follow the prompts to enter employee data:\r\n   - Input each field as requested (e.g., Employee ID, Department Code, etc.).\r\n   - Choose \"Y\" to continue adding employees or \"N\" to finish.\r\n3. After input is complete, the program will display a table of employees with 10.5+ years of service.\r\n\r\n### Sample Interaction\r\n```\r\nWHAT IS THE EMPLOYEE-ID? ex(123456)\r\n123456\r\nWHAT IS DEP-CODE? ex(123)\r\n123\r\nWHAT IS THE FIRST NAME?\r\nJohn\r\nWHAT IS THE LAST NAME?\r\nSmith\r\nWHAT IS THE YEAR OF SERVICE? (ex: 20.5)\r\n15.5\r\nDO YOU WANT TO CONTINUE? Y/N\r\nN\r\n```\r\n**Output:**\r\n```\r\nEMP-ID DEPT FIRST-NAME           LAST-NAME            SERVICE-YEAR\r\n--------------------------------------------------------------------------------\r\n123456 123  JohnSmith15.5\r\n```\r\n\r\n## Program Structure\r\n- **IDENTIFICATION DIVISION**: Defines the program name and metadata (author: Arman Bhatia, date: Feb 10, 2025).\r\n- **ENVIRONMENT DIVISION**: Configures the employee file.\r\n- **DATA DIVISION**: Defines file structure and working storage variables.\r\n- **PROCEDURE DIVISION**: Main logic:\r\n  - `101-INITIALIZE-OUTPUT-FILE`: Opens the file for writing.\r\n  - `102-GET-INPUT-FROM-USER`: Collects and writes employee data.\r\n  - `103-CLOSE-OUTPUT-FILE`: Closes the output file.\r\n  - `201-INITIALIZE-INPUT-FILE`: Opens the file for reading.\r\n  - `210-PRINT-HEADER`: Displays the table header.\r\n  - `202-GET-RECORD-FROM-FILE`: Reads and displays qualifying records.\r\n  - `203-CLOSE-INPUT-FILE`: Closes the input file.\r\n\r\n## Limitations\r\n- Displays only employees with 10.5+ years of service.\r\n- No input validation (e.g., accepts invalid formats).\r\n- Output formatting is basic and lacks consistent spacing.\r\n- Overwrites `EMPLOYEE-FILE.txt` each run (no append mode).\r\n\r\n## Contributing\r\nFeel free to fork this repository and submit pull requests for enhancements, such as:\r\n- Adding input validation for numeric and alphabetic fields.\r\n- Improving table formatting with better spacing.\r\n- Supporting file append instead of overwrite.\r\n- Including all employees in the output with a filter option.\r\n\r\n## License\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Contact\r\nFor questions or suggestions, open an issue or contact [arman.bhatia.1407@gmail.com].\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanbhatia0100%2Fcobol_employee_management_program","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmanbhatia0100%2Fcobol_employee_management_program","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanbhatia0100%2Fcobol_employee_management_program/lists"}