Posted: Wed May 07, 2008 1:04 pm Post subject: Omit columns from file
Hi,
I want to omit some of the columns from input file while copying.
Example..
Input file(80/vb)
Code:
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
Name Date Designation
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
Siva 07052008 Programmer
Aizaz 06052008 Manager
Sreeram 08052008 Lead
Output file(80/vb)
Code:
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
Name Designation
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
Siva Programmer
Aizaz Manager
Sreeram Lead
Now i don't want date column in the output file and designation column should from date column i.e 10 position.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed May 07, 2008 1:16 pm Post subject:
Assuming the Name field is 9 bytes long and the Designation field starts at position 25 (29 if you count the RDW) in the input file, you can use a DFSORT job like this to do what you asked for:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed May 07, 2008 2:58 pm Post subject:
RDW = record descriptor word. For a RECFM=V (VB, etc) file, the RDW occupies the first 4 bytes of the record. The first two bytes contains the length of the record including the RDW itself in binary. The next two bytes contain binary zeros. The first data byte starts in the fifth byte of the record after the RDW.
If you're going to be working with data sets on z/OS, you might want to familiarize yourself with the information in "z/OS Using Data Sets" at:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum