Hi All,
I need to replace a FIXEDBIN number of length 2 (position is 3-4) by another number in a PS file.Is there any sort condition similar to FINDREP?
In my case I need to replace 00 by 01.Thanks in advance:)
How to replace a FIXEDBIN number by another number in a file
Moderators: Frank Yaeger, Moderator Group
-
- Member
- Posts: 2
- Joined: Thu May 03, 2012 9:59 am
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Anithavincy,
If you want help, you'll need to do a better job of explaining exactly what it is you want to do.
Is FIXEDBIN equivalent to ZD, PD, BI or something else? If you don't know, show a few values in hex.
Please show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
http://www.ibm.com/support/docview.wss? ... g3T7000080
If you want help, you'll need to do a better job of explaining exactly what it is you want to do.
Is FIXEDBIN equivalent to ZD, PD, BI or something else? If you don't know, show a few values in hex.
Please show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
http://www.ibm.com/support/docview.wss? ... g3T7000080
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
-
- Member
- Posts: 2
- Joined: Thu May 03, 2012 9:59 am
Hi Nic\Frank,
Kindly find the detailed information ,
Input file:
Organization : PS
Record format : FB
Record length : 168
We have various fileds in the input file where we need to replace the generation field from "0" to "1" by using Sort .(By giving the input file and getting the output in another file of same specifications with the replacement of generation)
Structure of Generation:
1 IRITEM, IRI COMMON ITEM RECORD FORMAT
5 O_SYSTEM FIXED BIN(15),
5 O_GENERATION FIXED BIN(15),
For your refernece,
The input file only with the frist two fields(using FILEAID),
O_SYSTEM O_GENERATION
2/BFX 2/BFX
(1-2) (3-4)
1------- 2-----------
**********************
8 0
8 0
8 0
8 0
8 0
8 0
8 0
In the above Generation should be changed as follows,
O_SYSTEM O_GENERATION
2/BFX 2/BFX
(1-2) (3-4)
1------- 2-----------
***********************
8 1
8 1
8 1
8 1
8 1
8 1
8 1
Thanks,
Anitha.
Kindly find the detailed information ,
Input file:
Organization : PS
Record format : FB
Record length : 168
We have various fileds in the input file where we need to replace the generation field from "0" to "1" by using Sort .(By giving the input file and getting the output in another file of same specifications with the replacement of generation)
Structure of Generation:
1 IRITEM, IRI COMMON ITEM RECORD FORMAT
5 O_SYSTEM FIXED BIN(15),
5 O_GENERATION FIXED BIN(15),
For your refernece,
The input file only with the frist two fields(using FILEAID),
O_SYSTEM O_GENERATION
2/BFX 2/BFX
(1-2) (3-4)
1------- 2-----------
**********************
8 0
8 0
8 0
8 0
8 0
8 0
8 0
In the above Generation should be changed as follows,
O_SYSTEM O_GENERATION
2/BFX 2/BFX
(1-2) (3-4)
1------- 2-----------
***********************
8 1
8 1
8 1
8 1
8 1
8 1
8 1
Thanks,
Anitha.
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
FIXED BIN(15) is a 2-byte BI value.
It's still not clear what you want to do exactly, though.
If you want to put X'0001' in positions 3-4 of every record, you can use these DFSORT statements:
If you only want to replace X'0000' in positions 3-4 with X'0001', you can use these DFSORT statements:
If you want to replace X'0000' anywhere in the record with X'0001', you can use these DFSORT statements:
If you want to do something else, you need to be more specific about what you want to do.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
http://www.ibm.com/support/docview.wss? ... g3T7000080
It's still not clear what you want to do exactly, though.
If you want to put X'0001' in positions 3-4 of every record, you can use these DFSORT statements:
Code: Select all
OPTION COPY
INREC OVERLAY=(3:X'0001')
Code: Select all
OPTION COPY
INREC IFTHEN=(WHEN=(3,2,BI,EQ,X'0000'),OVERLAY=(3:X'0001')
Code: Select all
OPTION COPY
INREC FINDREP=(IN=X'0000',OUT=X'0001'
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
http://www.ibm.com/support/docview.wss? ... g3T7000080
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
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