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
 
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm

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