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
 
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 Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm

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