Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SORT Card issue for splitting header & detail

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: SORT Card issue for splitting header & detail
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

Site Director


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

PostPosted: Tue Jan 07, 2014 9:35 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Jan 08, 2014 7:42 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts SIGNAL ON HALT issue packerm CLIST & REXX 1 Fri Oct 20, 2017 6:56 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us