|
View previous topic :: View next topic
|
| Author |
Message |
pavaniramini
New User
Joined: 10 Feb 2010 Posts: 4 Location: pune
|
|
|
|
Hi,
we have 4 records in input file. The 1st two records are Header and remaing reords are Details. Please see the screen shot.
Attempt at images removed
For 1st header the detail appears in 3rd line & for 2nd header the detail appear in 4th line of input file. Sortcard is used as follows.
| Code: |
SORT FIELDS=(148,3,CH,A,130,5,CH,A,456,6,CH,A,35,4,CH,A,5,10,CH,A,
116,10,CH,A,94,10,CH,A,104,12,CH,A,3,2,CH,A)
SUM FIELDS=(39,13,ZD) |
The output comes as follows. For 1st header the detail appears in 4th line & for 2nd header the detail apperas in 3rd line. However we want for 1st header the 1st detail should appear in 2nd line & for 2nd header the detail should appear in 4th line.
Current Output file screenshot:
Attempt at image removed
if image is not visible please find attachement
Attachment removed
Code'd |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Someone has removed the parts of your posts that do not work here.
Suggest you post a reply using copy/paste and the Code tag for anything that you take from a mainframe screen.
There is a preview function that will let you to see your post as it will appear to the forum rather than how it looks in the Reply Editors.
If we can see whaty you are asking about, we have a better chance at helping. |
|
| Back to top |
|
 |
pavaniramini
New User
Joined: 10 Feb 2010 Posts: 4 Location: pune
|
|
|
|
input screenshot
input1
| Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
02500001001005 30020000386763503 ...
02500001001005 30020000383232806 ...
02400001171000 30020000386763503 ...
02400001171000 30020000383232806 |
...
input2
| Code: |
+----8----+----9----+----0----+----1----+----2----+----3----+----4----+----5----
********************************* Top of Data **********************************
...... 1000545 9999 80510 0021001
...... 1000546 9999 80510 0021001
...... 6210 80510 0021171
...... 2315 80510 0021171 |
input3
| Code: |
+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----
********************************* Top of Data **********************************
0021001005 07430 OAC ELECTRONIC CLEARINGS 16
0021001005 02004 OAC ELECTRONIC CLEARINGS 16
0021171000 910 OAC ELECTRONIC CLEARINGS 16
0021171000 911 OAC ELECTRONIC CLEARINGS 16 |
output screenshot
output1
| Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
02500001001005 30020000386763503 ...
02500001001005 30020000383232806 ...
02400001171000 30020000383232806 ...
02400001171000 30020000386763503 |
...
output2
| Code: |
+----8----+----9----+----0----+----1----+----2----+----3----+----4----+----5----
********************************* Top of Data **********************************
...... 1000545 9999 80510 0021001
...... 1000546 9999 80510 0021001
...... 2315 80510 0021171
...... 6210 80510 0021171 |
output3
| Code: |
+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----
********************************* Top of Data **********************************
0021001005 07430 OAC ELECTRONIC CLEARINGS 16
0021001005 02004 OAC ELECTRONIC CLEARINGS 16
0021171000 911 OAC ELECTRONIC CLEARINGS 16
0021171000 910 OAC ELECTRONIC CLEARINGS 16 |
|
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Good job with the copy/paste, but you did not enclose the data in the Code tags. Your post has been "Code'd". Please notice the difference.
Also, many of the helpers here are not able to download attachments due to the security rules of their organizations. |
|
| Back to top |
|
 |
sureshpathi10
Active User

Joined: 03 May 2010 Posts: 158 Location: Kuala Lumpur
|
|
|
|
Hi Pavaniramini,
Is there anyway to differentiate Header from Detail records?
Will there be only 4 records in the input file always? |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|