Selective block copy



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Selective block copy

Postby novice_always » Thu Jun 20, 2013 11:28 am

Hi,

I have got a requirement to retrieve selective block of data from a file. Like to know if anyone have got an idea in doing this using SORT.

Input file format. Consists of one main Header(0000)
and another common header(0010) for all accounts(ABC, XYZ,IJK,YUI).

0000
0010
1000 ABC
1000
3000
3000
|
|

0010
1000 XYZ
2000
2000
3000
3000
|
|
0010
1000 IJK
2000
3000
3000
|
|
0010
1000 YUI
2000
3000




My other input file has keys XYZ and YUI. This is present in record with sub-header(1000)


So my end file should only copy blocks have XYZ and YUI. I tried WHEN=GROUP, but could not
get resultant output. Any help

OUTPUT FILE
-------------------
0010
1000 XYZ
2000
2000
3000
3000
|
|
0010
1000 YUI
2000
3000

Thanks in advance
novice_always
 
Posts: 2
Joined: Thu Jun 20, 2013 11:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: Selective block copy

 

Re: Selective block copy

Postby BillyBoyo » Thu Jun 20, 2013 11:55 pm

Does the 1000 always follow the 0010? Only one 1000 per 0010?

Also, what is the RECFM/LRECL of your input files? Length of the account key?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Selective block copy

Postby novice_always » Fri Jun 21, 2013 1:08 pm

Sorry for the confusion created. the first block shuld have
0000
0010
1000 ABC
2000
3000
3000
Yes, 1000 always follow 0010. All account have one 1000 per 0010.

RECFM is VB and LRECL is 996.
Length of acct key is 9 digits.
novice_always
 
Posts: 2
Joined: Thu Jun 20, 2013 11:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: Selective block copy

Postby skolusu » Fri Jun 21, 2013 10:35 pm

novice_always wrote:My other input file has keys XYZ and YUI. This is present in record with sub-header(1000)


novice_always,

Please answer the following questions.

1. What is the LRECL and RECFM of the 2nd file which has the keys
2. Show us a sample input of that file
3. Are there any duplicates in that 2nd file?
4. Last but not least run the following job and show us the complete sysout, which will help us determine the level of DFSORT you are running.
//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*   
//SORTIN   DD *         
//SORTOUT  DD SYSOUT=*   
//SYSIN    DD *         
  OPTION COPY           
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post