Hi,
I'm having a flat file of LREC= 89. It is having a data of one table. let us assume that it is having Account number, status, acct_close_date,code.
1. The file is sorted based on account number in ascending and close_date in descending order. it will be looks like..
Acct status code acct_close_date
1 A aa (maximum date)
1 D bb (some date)
2 A cc (maximum date)
2 A dd (maximum date)
My question is I need to delete the 2nd record since it has Active account before that(1st record)...and I need to retain the 3rd and 4th row bcas both has close date as maximum date and they are active..
How to do it using JCL ?
Delete a record in jcl
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
What do you mean by "JCL"? Just those lines that start "//" in column one? Nope, can't be done.
You presumably have a PS/flat file? How do you think you'd delete records from there? Nope, can't be done.
Of course, with SORT or another programming language and by creating a new output file with only the data you want, it can be done.
You presumably have a PS/flat file? How do you think you'd delete records from there? Nope, can't be done.
Of course, with SORT or another programming language and by creating a new output file with only the data you want, it can be done.
-
- Member
- Posts: 2
- Joined: Tue Mar 29, 2016 7:05 am
-
- Member
- Posts: 2
- Joined: Thu Feb 09, 2017 1:57 pm
Knowledge Web has really great.
สมัครเล่นไฮโล
สมัครเล่นไฮโล
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page