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
 

 

Splitting on Ranges.

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

New User


Joined: 16 May 2005
Posts: 54

PostPosted: Tue Jun 23, 2009 6:12 pm    Post subject: Splitting on Ranges.
Reply with quote

Hi

I have two files. File1 is a VB file and LRECL is 500. Second file (File2) is a FB file and LRECL is 80.

In File1 the KEY which is 6 digit present in 4th position and is ZD.
In File2 the lower range starts from 1st position and is 6 bytes of length and upper range starts from 10th position and is of 6bytes length. But the ranges are PD.

My requirement is to create an output file based on the Key present in the range of File2.

EX
FILE1
...123456....
...567676...

...999999....

FILE2

000001...666666

So consodering the above example, the output should contain only two records from File1 marked in RED
Back to top
View user's profile Send private message

senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Tue Jun 23, 2009 8:05 pm    Post subject: Reply to: Splitting on Ranges.
Reply with quote

Hi Suzeet,

If i understood your requirement correctly, then only one record is present in file 2.

Sol:
store the lower range and higher range values of file 2 in SYMBOLS and in the next step use the symbols to INCLUDE the records that fall in the range.

The sample one can be seen in the below link
http://www.ibmmainframes.com/viewtopic.php?t=35171&highlight=
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jun 23, 2009 9:33 pm    Post subject:
Reply with quote

suzeet,

Here's a DFSORT job that will do what I think you asked for. I'm assuming there's only one record in file2 with two PD values.

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file2 (FB/80)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,
    BUILD=(C'TARG1,+',1,6,PD,TO=ZD,80:X,/,
           C'TARG2,+',10,6,PD,TO=ZD)
/*
//S2    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file1 (VB/500)
//SORTOUT DD DSN=...  output file (VB/500)
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(8,6,ZD,GE,TARG1,AND,8,6,ZD,LE,TARG2)
/*
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 Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Query on Splitting up a file abdulrafi COBOL Programming 19 Wed Apr 20, 2016 3:26 pm
No new posts Splitting file into 5 mallik4u JCL & VSAM 12 Wed Jul 15, 2015 10:13 pm
No new posts Splitting of the text without affecti... mkk157 DFSORT/ICETOOL 4 Wed Feb 18, 2015 6:10 pm


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