OMIT Header and Trailor records



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

OMIT Header and Trailor records

Postby Satish.bonda » Sat Feb 02, 2008 11:25 am

Hi,

I have set of records in a file. Each record has a header and trailor record. I want to omit few records based on one field. At the same time, i want to remove header and trailor record for that record also. Can any one please tell me the solution.

Example:

AAAA12345 --- Header record
Satish99207AAAA --- 99207 record.
Kumar99207AAAA --- one more record.
Sanju99207AAAA --- one more 99207 record
BBBB12345 --- Trailor record
AAAA12346 --- Again Header record
Rajkum56789jklhm --- other than 99207 record
BBBB12346 ---- Trailor record
AAAA12347 --- again header record
Doneku99207 ---- another data record
BBBB12347 --- Trailor record etc;
AAAA12348
kishjk56789
jamhjk56789
BBBB12348

Ques: I want to omit 99207 records including hedear and trailor using sort or any other utility

Expected result:

AAAA12346
Rajkum56789jklhm
BBBB12346
AAAA12348
kishjk56789
jamhjk56789
BBBB12348
Satish.bonda
 
Posts: 1
Joined: Sat Feb 02, 2008 11:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: OMIT Header and Trailor records

Postby Frank Yaeger » Sat Feb 02, 2008 11:01 pm

You need to describe the structure of your groups of records more clearly. What identifies a header record ('AAAA' in positions 1-4 or something else)? What identifies the 99207 record -is it just the record after the header record or something else? Does '99207' start at a fixed position in the record (what position?) or can it appear anywhere in the record?

What is the RECFM and LRECL of the input file?
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
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post