Help to perform delete for COMP-3

In this Mainframe Forum - You can post your queries on JCL,VSAM,COBOL,DB2,IMS Abend codes , solutions etc..

Moderator: Moderator Group

Post Reply
jxsrini
Member
Posts: 2
Joined: Tue Oct 21, 2014 6:15 pm

Help to perform delete for COMP-3

Post by jxsrini » Tue Oct 21, 2014 6:27 pm

Hi Team,

I have a situation where need to perform deletion of COMP-3 field data from FILE#1 that are present in File#2 but in Numeric value.

Please suggest a logic to perform the same, this has to be done in a faster way to avoid any delay.. as the FILE#1 is allocated to Online.

Any help will be appreciated.

Thanks,
Jaya

Background of the issue :
We have two files to be compared and found unmatched records. File-A and File-B. Both the files were SORTED to convert COMP-3 to Numeric and then performed compare. Now I have File-C with Unmatched records from File-B (This is in Numeric Format) Now I delete File-C records from File-B. But how do I do?
File-B has the field in COMP-3
File-C has the field in Numeric format.

jxsrini
Member
Posts: 2
Joined: Tue Oct 21, 2014 6:15 pm

Post by jxsrini » Tue Oct 21, 2014 7:00 pm

Field is declared as : PIC 9(7) COMP-3

For compare converted them as below :

File-A
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,34,2X,
40:35,4,PD,EDIT(TTTTTTTC),2X)

File-B
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,4,PD,EDIT(TTTTTTTC),2X,
15:5,500,2X)

File-C is like below :
0147458 .ÀØ|
0210000 .Ä..
0210001 .Ä..
0210002 .Ä..

Which has to be deleted from file which looks like :
.....Ä..
.....Ä..
.....Ä..
.....Ä..

Thanks,
Jaya

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Wed Oct 22, 2014 5:38 pm

Is this a sort question, a cobol question, a pl/1 question or what? It isn't a question on Abends or error codes.

By 'low values' do you mean x'00'?
Regards
Nic

academyindia4

Topic deleted by Admin

Post by academyindia4 » Thu Jan 21, 2016 11:13 am

<< Content deleted By Admin >>

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others