Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to include all detail records b/w specific HDR and TRLR.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Wed Jul 11, 2007 12:17 pm    Post subject: How to include all detail records b/w specific HDR and TRLR.
Reply with quote

I have the following file format:

B10625FD602000000000000000070920070

PT00011100625 1191003 ...................................
PT00021100625 1191003 ...................................
PT00031100625 1191010 ...................................

BT0625FD60200137139960941


Record starting B1 is the HDR.

Record starting BT is the TRLR.

My question is :

How can I include all the records under this HDR and TRLR in a seperate dataset.

I have a SORT condition where I can sort the records based on HDR and TRLRs, but how to include the records under them i.e. all the detail records under a particular HDR and TRLR.
Back to top
View user's profile Send private message

Nimesh.Srivastava

New User


Joined: 30 Nov 2006
Posts: 78
Location: SINGAPORE

PostPosted: Wed Jul 11, 2007 12:26 pm    Post subject:
Reply with quote

shitij,
for your first requirement you can use the following sort card to copy all the records between the header and trailor in a separate dataset
Code:
//SORTIN DD DSN= input dataset
//SORTOUT DD DSN= output dataset
//SYSIN    DD    *
  OPTION COPY
  OMIT COND=(1,2,CH,EQ,C'B1',|,
             (1,2,CH,EQ,C'BT'))

But I am not clear on your second requirement, can you please elaborate more on the same.

Hope this helps
Nimesh
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Wed Jul 11, 2007 12:31 pm    Post subject:
Reply with quote

hi

how many header and detail combination u hve in input file

i mean to say that one combintaion is
Record starting B1 is the HDR.
Record starting BT is the TRLR.

do u have other combination too.

Plese let me know then we can provide various suggestions

Thanks
sandeep
Back to top
View user's profile Send private message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Wed Jul 11, 2007 2:36 pm    Post subject: Re: How to include all detail records b/w specific HDR and T
Reply with quote

Hi,


And thanks for your concern, I am highly obliged.

***********************************************************
I have same HDRs and TRLRs for the file:

B10625FD602000000000000000070920070

BT0625FD60200137139960941


But I can distinguish them from the 10th Character of the HDR and TRLR i.e.

If position 10 = 0104 or 0200 or 4333

Just would want all the records b/w a partcular HDR and TRLR to come out in a file - Based on 10th position of the HDR and TRLR.
Back to top
View user's profile Send private message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Wed Jul 11, 2007 3:01 pm    Post subject: Hi Nimesh
Reply with quote

Hi Namish,

I think your option will give me - only header and trailer records in a seperate file.

What I am looking for is the data between the Header and Trailer - that shud come along that.

And I think '|' is nothing but AND option itself, In that case the above condition is just fetching HDR and TRLR records only and not the data b/w them.
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Wed Jul 11, 2007 3:16 pm    Post subject:
Reply with quote

plse chg Nimesh card to
Code:
//SORTIN DD DSN= input dataset
//SORTOUT DD DSN= output dataset
//SYSIN    DD    *
  OPTION COPY
  OMIT COND=(1,2,CH,EQ,C'B1',OR,
             (1,2,CH,EQ,C'BT'))

/*
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Jul 11, 2007 3:22 pm    Post subject:
Reply with quote

shitij

Quote:
And I think '|' is nothing but AND option itself

'|' is OR condition
and '&' is AND condition

Nimesh.Srivastava's solution is correct.
Check it once again!

If you want to check this way
Quote:
But I can distinguish them from the 10th Character of the HDR and TRLR i.e.

If position 10 = 0104 or 0200 or 4333

Then the OMIT condition would be
Code:
OMIT COND=(10,4,CH,EQ,C'0104',OR,
10,4,CH,EQ,C'0200',OR,
10,4,CH,EQ,C'4333')
Back to top
View user's profile Send private message
Nimesh.Srivastava

New User


Joined: 30 Nov 2006
Posts: 78
Location: SINGAPORE

PostPosted: Wed Jul 11, 2007 3:23 pm    Post subject:
Reply with quote

shitij,
its very confusing, in the first post you have written
Quote:
Record starting B1 is the HDR.

Record starting BT is the TRLR.

and last post
Quote:
But I can distinguish them from the 10th Character of the HDR and TRLR i.e.
If position 10 = 0104 or 0200 or 4333


if you want all the records between the header and trailor to go into a single dataset then you can use the sort card specified earlier.
or else what I make out,if your file can have multiple occurences of header and trailor based upon values from 10th position
go through this post from DFSORT, it might help you
http://ibmmainframes.com/viewtopic.php?t=22454&highlight=header

Hope this helps
Nimesh
Back to top
View user's profile Send private message
Nimesh.Srivastava

New User


Joined: 30 Nov 2006
Posts: 78
Location: SINGAPORE

PostPosted: Wed Jul 11, 2007 3:30 pm    Post subject:
Reply with quote

shitiz,
by the time I wrote you have replied
Quote:
I think your option will give me - only header and trailer records in a seperate file.
What I am looking for is the data between the Header and Trailer - that shud come along that.
And I think '|' is nothing but AND option itself, In that case the above condition is just fetching HDR and TRLR records only and not the data b/w them.


no the sort would give all records between the header & trailor its OMIT not INCLUDE condition.
| pipe is the symbol for OR not AND

Nimesh
Back to top
View user's profile Send private message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Wed Jul 11, 2007 4:57 pm    Post subject: Hi
Reply with quote

I think I am not clear on this :-

I have the following file format:

B10625FD602000000000000000070920070

PT00011100625 1191003 ...................................
PT00021100625 1191003 ...................................
PT00031100625 1191010 ...................................

BT0625FD60200137139960941


Record starting B1 is the HDR.

Record starting BT is the TRLR.

My question is :

How can I include all the detail records i.e. all the PT records (those are the detail records) under this HDR and TRLR in a seperate dataset.

Ur conditions for OMIT - will get me all the B1 and BT fields, I am looking for a condition which can bring all the PT records i.e. DETAIL RECORDS on the basis of HDR and TRLR.


I hope I am clear now - else I will be glad to explain more.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Jul 11, 2007 5:21 pm    Post subject:
Reply with quote

shitij

Look at the topic Include or omit groups of records at [url]http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/ [/url]
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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Route a product's job to specific lpar vasanthz All Other Mainframe Topics 9 Thu Mar 02, 2017 2:22 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us