Cobol-DB2 | Cobol -IMS | |
1 | Need to Prcompile to generate 1. DBRM (Sql Staments only) 2. Cobol Object code | No Precompilation Required |
2 | Bind the DBRM to Generate Plan. Plan consists of Executable SQL Quries | No Bind Process is Required. Here we Write PSBs to fetch respective Record. |
3 | Compile Cobol Code | Compile Cobol-Ims program |
4 | Execute Cobol - DB2 Program using IKJEFT01, where in we Specify Program Name and Plan Name to be Executed | Execute Cobol-IMS program using DFSRRC00. Pass Program Name , PSB, Name, Plan name Thru Parm Parameter |
Why We need BIND In DB2 not in IMS | ||
Say below query is written in Cobol-Db2 Program | Equivalent IMS Call | |
1 | Select A, B, C | First Define PCB to Fetch the field A, B, C |
Where A=10 | Using DLI Call fetch the field A, B, C specified in above PCB | |
CALL CBLTDLI USING GU , PCB-NAME , SSA-Field (Populate Key value 10 to SSA) | ||
2 | Above Query turned to executable query by binding Plan | compile PSB (can hold n no of PCBS) |
3 | use this plan to execute the Program (while executing Cobol- Db2 Program, when a DB2 statement is encountered, system refers to plan to execute respective query) | Using This PSBLIB to execute the CBLTDLI call. (while executing Cobol-IMS Program, when a DLI /IMS statement is encountered, system points to respective segment to be fetched using respective PCB) |
Below process helps to find out the statement, caused the SOC7 error. Check the Sysout of RUNJCL . This shows the error statement and lists offset value Take the Offset Value 000003C0 Got to respective Compilation Job listing, check the sysprint Search for the offset value 0003C0 (delete +00 -- initial 3 letters of Offset value and search for it) check below 2 screen shots This Offset value is listed under line no 0045 – which refers to Move statement. Take this no. 045 and find for it in same sysprint. This points to the exact statement, caused SOC7 T his 045 pints to the Move statement 1526, this is the exact line in the program Check for the above line no. In source program . This points to the statement highlighted below . Check the statement, variable check-4, which is added to check-6. These are having different Picture clause. check-4 is alfhanumaric, holding some junk data, when this data is moved to Chcek-6 variable(of comp-3) creates SOC7 error. This is just an example to e...
Comments