COBOL Reference Modification With OF Syntax to use reference modification for a filed, which exists in multiple groups. Ex: 01 ww-grp1 03 name1 pic x(10) 03 sal pic 9(4) 01 ww-grp2 03 name1 pic x(10) 03 sal pic 9(4) name1 exists in both groups. So if we want to use reference modification for ww-grp1 move
Difference Between LINK XCTL and COBOL Calls(Static & Dynamic) 1. LINK –> Every time a subprogram is invoked an initialized version of working storage is provided. Dynamic& Static –> Not every time a separate copy of working storage is provided. It is provided only for the first time invocation of sub-program and for the subsequent
COBOL RANDOM Function generates the random fractional values ranging from 0 to 1. It generates values like 0.xxx For example if we declared the variable as below 01 WW-RANDOM-NUMBERS PIC 99.999 VALUE ZEROES. PERFORM VARYING WW-SUB1 FROM 1 BY 1 UNTIL WW-SUB1 > 9 COMPUTE WW-RANDOM-NUMBERS = FUNCTION RANDOM DISPLAY ‘–>’WW-RANDOM-NUMBERS END-PERFORM Result: –>00.443 –>00.060
INSPECT verb in COBOL is very useful and it is used to do the following functionalities Count a particular Character in a string Convert Lower case to upper case Replace a particular Character with other character in a string Replace a set of characters with another set of characters Below are the different examples on
1) To view the structure (details like starting position, end position, length and type of fields) of a copybook – This can be viewed from FILEAID option 8. 2) To Copy a member from one PDS to Another: Open the first PDS using 3.4, and type C before the member and ENTER it will ask
How to remove the line numbers in 1 to 6 columns in TSO/ISPF i) First set the Bands – type BNDS on line-number of the editor panel Generally the default bands are set from 1 to 72 columns as shown below and this can be changed as per our requirement. This can also be used
CICS MAP – adding a new field Step by step Procedure using SDF II: SELECT AN SDF II FUNCTION 1 PANEL EDITOR Create or modify a panel 2 PANEL GROUP EDITOR Create or modify a panel group 3 PARTITION SET EDITOR Create or modify a partition set 4 AID TABLE EDITOR Create or modify an
SQLDA USE in Dynamic SQL: Db2 uses the SQL Descriptor Area(SQLDA) to communicate the dynamic SQL information to the application program. It contains the various information like type of SQL, length, pointer to the actual data & number of columns etc. which are very useful for better coding. To get this information into SQLDA after
Sometimes we may face a requirement to check the file is empty or not, if it is empty stop the process other wise proceed with further steps using JCL. Here are some of the commonly used methods to check whether a Physical Sequential (PS) or VSAM File is empty or not. 1. By Using IDCAMS
Multi row Fetch Overview in COBOl Db2 program WITH EXAMPLE: Cobol Db2 multi row fetch concept will be used to retrieve multiple rows with a single fetch statement as opposed with a normal cursor which fetches only single record at a time. The multi-row fetch capability was introduced to DB2 z/OS in Version 8. This