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
 

 

Eliminate Non-Numeric data from POS 4 till 11

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

New User


Joined: 02 Sep 2005
Posts: 26
Location: Hyderabad

PostPosted: Thu Aug 23, 2007 1:31 pm    Post subject: Eliminate Non-Numeric data from POS 4 till 11
Reply with quote

Hi all,

Code:

//PS0100   EXEC PGM=ICEMAN                                   
//*--------------------------------------------               
//SYSOUT   DD  SYSOUT=*                                       
//SYSPRINT DD  SYSOUT=*                                       
//SYSUDUMP DD  SYSOUT=*                                       
//SORTIN   DD DISP=SHR,DSN=XXXX.XXX.abc
//OUT1     DD DSN=XXXX.XXX.abc.sortout,         
//         DISP=(NEW,CATLG,DELETE),                           
//         UNIT=(SYSALLDA,30),SPACE=(CYL,1),                 
//         LRECL=3080,RECFM=FB,BLKSIZE=0                     
//SYSIN    DD *                                               
    OPTION COPY                                               
    OUTFIL INCLUDE COND=(4,1,CH,GE,C'0',                     
                      AND,4,1,CH,LE,C'9',                     
                      AND,5,1,CH,GE,C'0',                     
                      AND,5,1,CH,LE,C'9',                     
                      AND,6,1,CH,GE,C'0',                     
                      AND,6,1,CH,LE,C'9',                     
                      AND,7,1,CH,GE,C'0',         
AND,7,1,CH,LE,C'9',               
AND,8,1,CH,GE,C'0',               
AND,8,1,CH,LE,C'9',               
AND,9,1,CH,GE,C'0',               
AND,9,1,CH,LE,C'9',               
AND,10,1,CH,GE,C'0',             
AND,10,1,CH,LE,C'9',             
AND,11,1,CH,GE,C'0',             
AND,11,1,CH,LE,C'9',             
AND,12,1,CH,GE,C'0',             
AND,12,1,CH,LE,C'9'),FNAMES=OUT1 
/*


In the input file pos 4 to 11 has non-numeric values. Need to eliminate this... This job is getting abended...OUTFIL STATEMENT : SYNTAX ERROR..
Cld anyone help?

Thanks!
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 Aug 23, 2007 8:46 pm    Post subject:
Reply with quote

Here's a DFSORT job that will eliminate records with non-numeric data in positions 4-11:

Code:

//PS0100   EXEC PGM=ICEMAN
//SYSOUT   DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SORTIN   DD DSN=...   input file
//SORTOUT  DD DSN=...  output file
//SYSIN    DD *
  OPTION COPY
  INCLUDE COND=(4,8,FS,EQ,NUM)
/*


Quote:
This job is getting abended...OUTFIL STATEMENT : SYNTAX ERROR..


Yes, because you have syntax errors.

Code:

    OUTFIL INCLUDE COND=(4,1,CH,GE,C'0',


should be:

Code:

    OUTFIL INCLUDE=(4,1,CH,GE,C'0',


The lines starting with:

Code:

AND,7,1,CH,LE,C'9',


should have at least one blank before the AND, that is, they should start in column 2 or higher.

Also, you say you want to check for non-numeric values in 4-11 but then you have conditions for position 12 which you shouldn't.
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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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