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
 

 

Need to Include some records

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

Active User


Joined: 20 Sep 2008
Posts: 102
Location: Bangalore

PostPosted: Thu May 07, 2009 3:15 pm    Post subject: Need to Include some records
Reply with quote

Hi all,

I am having an requiremnet like Below,
Code:

----+----1----+----2
387734916 5ab00     
387734916    6666000
387734916 7776666000
215977740 700000000
896257164 300       
989998059 65000     
365240881 420 456   
986031490 a999     
986031490 aaaaaaaaaa
 


So my output should loook like below,

Code:

----+----1----+----2
387734916    6666000
387734916 7776666000
215977740 700000000
896257164 300       
989998059 65000     


So the conditiion for population is,

1) If any record contains any of the character like( A to Z, or & ...) It should not populate in the repoert.

2) Records contais only numeric values should come.

3) If there is any spaces between two numeric values then that record should not come.

The lrecl of Input file and Output File = 80. The field to valdate starts from 11 position upto 10 lengths.

I tried with the below code,
Code:

//SYSIN    DD *                 
  OPTION COPY                   
  INCLUDE COND=(11,10,FS,EQ,NUM)



But i got only one record 387734916 7776666000

Please help me if anyone has the solution for this task.

Thanks in Advance
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: Thu May 07, 2009 9:42 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,
    OVERLAY=(81:11,10,SQZ=(SHIFT=LEFT,MID=C'X'))),
   IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=81,ENDPOS=90,
    IN=C' ',OUT=C'0'))
  OUTFIL INCLUDE=(81,10,FS,EQ,NUM),BUILD=(1,80)
/*
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 Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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