View previous topic :: View next topic
|
Author |
Message |
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Hi,
My input data (LRECL=80, RECFM=FB) appears as shown below:
Code: |
----+----1----+----2----+----3
01XX8 XXXXX8GIMS
02XX8 XXXXX813SALT
14XX8 XXXXX811022051
15XX8 XXXXX831001102
99XX8 XXXXX8
01X18 XXXX18GIMS
02X18 XXXX1823GILT
99X18 XXXX18
01118 XXX118GIMS
02118 XXX11813SALT
14118 XXX11811022051
15118 XXX11831001102
99118 XXX118
|
I would like to copy all those sets of records that have '13SALT' appearing at 16th position on 02 type record.
Expected Output:
Code: |
01XX8 XXXXX8GIMS
02XX8 XXXXX813SALT
14XX8 XXXXX811022051
15XX8 XXXXX831001102
99XX8 XXXXX8
01118 XXX118GIMS
02118 XXX11813SALT
14118 XXX11811022051
15118 XXX11831001102
99118 XXX118
|
Applying the logic suggested by superk in my previous post (it had worked for that requirement though) does not get me the full results and omitting 01 type on 1st set of records !!
Please help.
Thanks. |
|
Back to top |
|
|
xknight
Active User
Joined: 22 Jan 2008 Posts: 117 Location: Liberty city
|
|
|
|
Quote: |
I would like to copy all those sets of records that have '13SALT' appearing at 16th position on 02 type record. |
Why new topic, could have continued on prior post.
Is it a new requirement.
Quote: |
I would like to copy all those sets of records that have '13SALT' appearing at 16th position on 02 type record. |
You haven't answered yet for NIC's question. What do you mean by set of records (Is it 02 14 15 and 99) and what if 02 hasn't 14 & 15 as you shown in sample input
Code: |
01X18 XXXX18GIMS
02X18 XXXX1823GILT
99X18 XXXX18 |
|
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
Take a look here. It is similar to your requirement. |
|
Back to top |
|
|
|