IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORT Card issue for splitting header & detail


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pavaniramini

New User


Joined: 10 Feb 2010
Posts: 4
Location: pune

PostPosted: Tue Jan 07, 2014 8:23 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 07, 2014 9:35 pm
Reply with quote

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
View user's profile Send private message
pavaniramini

New User


Joined: 10 Feb 2010
Posts: 4
Location: pune

PostPosted: Wed Jan 08, 2014 12:13 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 08, 2014 7:42 pm
Reply with quote

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
View user's profile Send private message
sureshpathi10

Active User


Joined: 03 May 2010
Posts: 154
Location: Kuala Lumpur

PostPosted: Thu Jan 09, 2014 7:49 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top