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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am

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