If my file contains 100,000 records and job abended at
55,000th records processing then how can i restart job from
that record onward by ignoring that record. I can not edit
the file as file size is big and it is getting browse
substituted?
If there are two copybooks which have same variables and we
are using both the copybooks in our program. will there be
an error and if i move values to the variable which copybook
varibales gets the values i move in.
I have a seq file with different fields one field is address
with pic x(50) as input in a cobol program. In address there is
'PUNE' at any different positions in the address field ( form 1
t0 50) . My requirement is select the fields with address 'PUNE'
by using cobol. Please suggest
IF there 5 to 6 files in a JCL and there is some space
abends, how can we identify which file has space abend and
what can be done to get off that abend or rectify that abend.
If there are two files one with 100 records and other with
101 records. we have to find out the one record that is the
odd man out . What are the steps to do it
Can you please let me know the centre name of INS
certification in Kolkata.
154
Using string statement.Is coding three destination string
from one source string possible in one code?or three codes
for every destination string of one source string.?thank you
I have one ps file in which there are 3 fileds
emp_no,emp_name and leave_app.this ps file information give
the detail of employee which is going to apply for
leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that
means he is going to apply for 1 day leave.and accordingling
the table in db2 will be updated means if he has that no of
leave in his account then he will get dat leave and updated
acc. in table(leave_balance=previous leave present in
table-leave_app).Now i want to check whther the updated
result is correct or not by comparing the two ps file using
IEBCOMPARE or icetool so what is going to be the two ps file
and how its is going to be compare.
IDENTIFICATION DIVISION.
PROGRAM-ID. UPDT.
AUTHOR.anbu.
DATE-WRITTEN. AUG 13.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT CMSTR ASSIGN TO CINP1
ORGANIZATION IS INDEXED
ACCESS IS SEQUENTIAL
RECORD KEY CM2-KEY
FILE STATUS IS WS-CMSTR-FST.
SELECT CTAB ASSIGN TO CINP2
ORGANIZATION IS
ACCESS IS
SEQUENTIAL
RECORD KEY VSAM-WHSE-
KEY
FILE STATUS IS WS-CTAB-
FST.
DATA
DIVISION.
FILE
SECTION.
FD
CMSTR.
COPY
RXCYFC20.
FD
CTAB.
COPY
AITYWHSE.
************************************************************
******
*** WORKING STORAGE
VARIABLES ***
************************************************************
******
WORKING-STORAGE
SECTION.
01 WS-
VARIABLES.
05 WS-EB PIC X(02) VALUE
ZEROES.
05 WS-DIV PIC 9(03) VALUE
ZEROES.
05 WS-CMF-RECS-REWRITTEN PIC 9(01) VALUE
ZERO.
*** FILE STATUS
VARIABLES ***
05 WS-
FILESTATUS.
10 WS-CMSTR-FST PIC 9(02) VALUE
ZEROES.
10 WS-CTAB-FST PIC 9(02) VALUE
ZEROES.
*** END OF FILE
VARIABLES ***
05 WS-CMSTR-EOF PIC X(01)
VALUE 'N'.
88 WS-CMSTR-EOF-YES
VALUE 'Y'.
88 WS-CMSTR-EOF-NO
VALUE 'N'.
05 WS-CTAB-EOF PIC X(01)
VALUE 'N'.
88 WS-CTAB-EOF-YES
VALUE 'Y'.
88 WS-CTAB-EOF-NO
VALUE 'N'.
**** ERROR
VARIABLES ****
05 WC-ABEND-900 PIC 9(03) VALUE
900.
05 WE-ERR-CODE PIC 9(02) VALUE
ZEROES.
05 WE-ABEND-CODE PIC 9(03) VALUE
ZEROES.
************************************************************
****
********* PROCEDURE DIVISON
**********
************************************************************
****
PROCEDURE
DIVISION.
0000-
BEGIN.
PERFORM 1000-INITIALISE THRU 1000-
EXIT.
PERFORM 2000-PROCESS THRU 2000-
EXIT
UNTIL WS-CMSTR-EOF-
YES.
DISPLAY 'WS-CMF-RECS-REWRITTEN :' WS-CMF-RECS-
REWRITTEN.
PERFORM 5000-CLOSE THRU 5000-
EXIT.
GOBACK.
0000-
EXIT.
EXIT.
1000-
INITIALISE.
OPEN I-O
CMSTR.
EVALUATE WS-CMSTR-
FST
WHEN
00
WHEN 97
CONTINUE
WHEN OTHER
DISPLAY 'ERROR IN READING INPUT FILE: '
DISPLAY WS-CMSTR-FST
MOVE WS-CMSTR-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-EVALUATE.
OPEN INPUT CTAB.
EVALUATE WS-CTAB-FST
WHEN 00
WHEN 97
CONTINUE
WHEN OTHER
DISPLAY 'ERROR IN READING INPUT FILE: '
DISPLAY WS-CTAB-FST
MOVE WS-CTAB-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-EVALUATE.
1000-EXIT.
EXIT.
2000-PROCESS.
READ CMSTR.
EVALUATE WS-CMSTR-FST
WHEN 00
CONTINUE
WHEN 10
SET WS-CMSTR-EOF-YES TO TRUE
GO TO 2000-EXIT
WHEN OTHER
DISPLAY 'ERROR IN READING INPUT FILE: '
DISPLAY WS-CMSTR-FST
MOVE WS-CMSTR-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-EVALUATE
IF CM2-RECORD-TYPE-SOLD-TO
MOVE CM2-ENTERING-BRANCH TO WS-EB
PERFORM 3000-READ THRU 3000-EXIT
UNTIL WS-CTAB-EOF-YES
END-IF.
2000-EXIT.
EXIT.
3000-READ.
MOVE WS-EB TO VSAM-WHSE-CD.
MOVE 'WHSE' TO VSAM-WHSE-ID.
READ CTAB.
EVALUATE WS-CTAB-FST
WHEN 00
MOVE WHSE-DIV-CODE TO WS-DIV
PERFORM 4000-REWRITE-CMF THRU 4000-EXIT
WHEN 10
SET WS-CTAB-EOF-YES TO TRUE
GO TO 3000-EXIT
WHEN OTHER
DISPLAY 'ERROR IN READING TABLE FILE: '
DISPLAY WS-CTAB-FST
MOVE WS-CTAB-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-
EVALUATE.
3000-
EXIT.
EXIT.
4000-REWRITE-
CMF.
IF WS-DIV = 250 OR
252
MOVE 'F' TO CM2-FREIGHT-
TYPE
MOVE 1 TO CM2-FREIGHT-THRESHOLD-
AMT
ADD +1 TO WS-CMF-RECS-
REWRITTEN
REWRITE CM2-SOLD-TO-
RECORD
DISPLAY 'RECORD
UPDATED'
END-
IF.
* EVALUATE WS-CMSTR-
FST
* WHEN
00
*
CONTINUE
* WHEN
OTHER
* DISPLAY 'FILE NOT
UPDATED'
* DISPLAY WS-CMSTR-
FST
* MOVE WS-CMSTR-FST TO WE-ERR-CODE
* PERFORM 9999-ABEND-PARA THRU 9999-EXIT
* GO TO 4000-EXIT
* END-EVALUATE.
4000-EXIT.
EXIT.
5000-CLOSE.
CLOSE CMSTR
CTAB.
5000-EXIT.
EXIT.
9999-ABEND-PARA.
COMPUTE WE-ABEND-CODE = WC-ABEND-900 + WE-ERR-CODE
CALL 'ILBOABN0' USING WE-ABEND-CODE
GO TO 5000-CLOSE.
9999-EXIT.
EXIT.
5000-CLOSE.
CLOSE CMSTR
CTAB.
5000-EXIT.
EXIT.
9999-ABEND-PARA.
COMPUTE WE-ABEND-CODE = WC-ABEND-900 + WE-ERR-CODE
CALL 'ILBOABN0' USING WE-ABEND-CODE
GO TO 5000-CLOSE.
9999-EXIT.
EXIT.
//this program is giving maxcc=0, but not updating..
53
How can I find the maximum value of a field in a file while
reading the file dynamically? without using sort function.
Suppose i have a file with fields Timestamp, description,
teamname, teamnumber.. i have read the file till end and
find the maximun value of timestamp which is not in sorted
order.. can we use function max(timestamp)?
i made it to stage 3 of an interview process wednessday
they will quiz my knowledge again face to face for an
analyst role recruiter said it will be based on Business
requirements system is cobol and good ideas what they might
ask etc
hi, can you ppl tell me, how to check whether the rewrite
we gave for the ksds file is successful or not in the
program.? i gave rewrite, the rewrite code is executing and
maxcc=0 but updation doenot happen in the file?