Posts

Dynamic Allocation of PS Dataset Using a COBOL program.

Image
 Hi Mainframe, In most of Mainframe Shops, we use JCL for Allocation of PS Dataset. But Many a times a requirement comes where we need to allocates a PS dataset dynamically within a COBOL program which catalog the Files and once catalog the Allocated PS Dataset can be used to perform various File I/O operations such as Open, Read, Write and Close file. In order to Achieve these IBM has provide many Utility as such Sub program can be called in the COBOL main program as a Static call with the Appropriate TSO command to Allocate a new File Dynamically.  Syntax for PS Data Set Allocations is: DSN(&SYSUID..MVS.TEST.FILE01) NEW TRACKS SPACE(100,100) UNIT(SYSDA) CATALOG The file name is Specified in the DSN and any number of Files can be Allocated using IBM Supplied Utility. The most come IBM Utility Used is: 'PUTENV' This Utility or Subprogram is called STATICALLY with the Above mention DSN details....         ID DIVISION .         PROGRAM-ID .   GETENVX.         AUTHOR.        S

COBOL INSPECT Function

Image
In the real world scenario many a times you required to find the length of string value to do a concatenation or string parse but more commonly is used in the VARCHAR column data type of DB2 table. Hence it becomes important for any application to be aware of the COBOL function available to calculate the length of the input string. one of the very common methods used in COBOL for finding the length of the string is to use a INSPECT function. the INSPECT function majorly are of two times. in this blog I will shows you the following 2 types of INSPECT TALLYING function which help to get the length of string, very much need in teal world scenarios. Basic syntax: Below is the example of the COBOL code which receives data from JCL using instream and PARM parameter instream data received by the COBOL program by issuing a ACCEPT statement whereas, the PARM parameter is received by the COBOL program by using LINKAGE SECTION and by mentioning PROCEDURE USING linkage section structure. you can c

What is Job control Language?

Image
In today's world where the pandemic has changed the dynamics of digital world and unearth the gap in the mainframe skills, which  runs z/OS as it's operating system capable of handling millions and trillions of transaction with a zero down, crucible for running mission critical applications in banking, insurance, telecommunications, health care and government federal military domain. the lack of mainframe skill and misconception of mainframe being at the end of it's lifespan due to a wrong belief of soon to be replaced by a modern system has created a huge in the dependency to run business and the adequate skills required to support the system. Hence today I will be discussing and learn about JCL (Job Control Language), which is the script of any application system catering to a specific purpose to business continuity. Any system is chain/sequence of programs executing in synchronous manner with a various input/output operation to get the desired result. hence it becomes ma

Sort JCL in Descending Order and Format the output

Image
JCL sort is IBM utility used for sorting input data source such as PS, VSAM or SMS files. In this example I will demonstrate on How to Sort the Sequential Data set in Descending order and in the last, format the record in such a way that we will only get the selected column values in the output file JCL: This JCL executes SORT program in 2 steps Step01 - sorts the input file in Descending Order Step02 - copy the input file in output while in specified Format only. //* THIS JCL SORTS THE OUTPUT FILE IN DESCENDING ORDER       //* AND FORMATS THE OUTFILE                                  //STEP01   EXEC PGM=SORT                                     //SYSOUT   DD SYSOUT=*                                       //SORTIN   DD DSN=G101105.CLAIM.EXTRACT1,DISP=SHR            //SORTOUT  DD DSN=G101105.CLAIM.SORTED,                      //         DISP=(NEW,CATLG),UNIT=SYSDA,                      //         SPACE=(CYL,(100,100),RLSE),                       //         DCB=(LRECL=135,RECFM=FB,BLKSIZE=

Fixing DB2 data for A Given table using Batch Program.

Image
Hi Mainframe, Batch programming is a very powerful process which helps process Millions of record from a input data source. An Input data source can be a VSAM dataset, SMS files or Database Such as DB2 or IMS.  In these Blog we will be studying the Batch Application to update DB2 database which is our source of data having bad column value in it.  Many a times while working on Application Development or Enhancement, there is an unwanted Initialize or Move Statement in the Application program which cause the Database to be update with wrong values. And it becomes important to Fix this. As the Above Database has impacted 1000's & 10,000's of record values it becomes impossible to update each record with correct field without a Batch module. To facilitate the Batch update, we have been provided with many a techniques to collectively select and update a output desired records. One of those techniques which is widely and commonly used by Application developer is the use of CURSO