Posts

Git - Daily Workflow and Frequently Used Commands

If you use Git as your version control system for your project, you must need to have an basic overview of the most frequently used git commands and git workflow for working with git in an enterprise team project. This post is precisely going to talk about it. Begin a Project/Task -  In most cases, you will be working on an existing remote repository in an enterprise project. you will be asked to clone the remote repository into your local and start working on a new branch.  Before you can do a git clone, you have to -  a. Set up an SSH/HTTP connection between your computer and remote repository (GitHub or Azure Devops) b. Create a directory on your local computer where you want to clone the remote repo.  Here is the command you can use to clone an existing repository -  $ git clone <REMOTE_REPO_URL> Note - this is a one-time activity which you need to do unless you mess up the repository and want to fix it by cloni...

How To Dynamically Allocate Files from a Cobol Batch Program

Normally, in COBOL file based process we allocate file in the JCL using DD names. However, There can be situations when we might need to allocate files dynamically. For example, there is a requirement to allocate different file for different member ID. The total number of files needs to be allocated is not a constant and also the file names need to have the member ID in the file naming. So the files can not be allocated in the JCL, it has to be allocated at the run time when the Cobol program is processing data.  This type of requirement is the best use case for using 'dynamic file allocation technique'. IBM supplied routine BPXWDYN can be used to dynamically allocate files in batch programs. The below sample code snippet dynamically creates a new dataset and allocates it to DDname OUTFILE and then it opens the file in OUTPUT mode and writes a record to it. IDENTIFICATION DIVISION.  PROGRAM-ID. MCANUP6.  ENVIRONMENT DIVISION.  INPUT-OUTPUT SECTION...