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
 
Problem in removing non-numeric characters.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Thu Feb 14, 2008 4:17 pm    Post subject: Problem in removing non-numeric characters.
Reply with quote

All,

I have a requirement of removing non-numeric characters from my input file. It starts from byte 31 and ends in 47. i created a SORT card for this. But when i submitted the job it abended with U0016. When i checked in my spool, it says 'WER268A INREC STATEMENT : SYNTAX ERROR'.
Can any one help me out? Also, i don't want to have as many steps as the number of times checked for non-numeric.

Code:

// EXEC PGM=SORT                                               
//SORTIN DD DSN=ABC.INPUT,DISP=SHR
//SORTOUT DD DSN=ABC.OUTPUT,
//           DISP=(NEW,CATLG,DELETE),       
//           SPACE=(TRK,(500,100),RLSE),     
//           RECFM=FB,LRECL=80               
//SYSOUT DD SYSOUT=*                                           
//SYSIN DD *                                                           
 OPTION COPY                                                           
 INREC IFTHEN=(WHEN=(31,1,FS,NE,NUM),OVERLAY=(31:C' '),                 
               HIT=NEXT),                                               
       IFTHEN=(WHEN=(32,1,FS,NE,NUM),OVERLAY=(32:C' '),                 
               HIT=NEXT),                                               
       IFTHEN=(WHEN=(33,1,FS,NE,NUM),OVERLAY=(33:C' '),                 
               HIT=NEXT),                                               
       IFTHEN=(WHEN=(34,1,FS,NE,NUM),OVERLAY=(34:C' '),                 
               HIT=NEXT),                                               
       IFTHEN=(WHEN=(35,1,FS,NE,NUM),OVERLAY=(35:C' '),                 
               HIT=NEXT),                                               
       IFTHEN=(WHEN=(36,1,FS,NE,NUM),OVERLAY=(36:C' '),                 
               HIT=NEXT),                                               
       IFTHEN=(WHEN=(37,1,FS,NE,NUM),OVERLAY=(37:C' '),                 
               HIT=NEXT),                                               
       IFTHEN=(WHEN=(38,1,FS,NE,NUM),OVERLAY=(38:C' '),                 
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(39,1,FS,NE,NUM),OVERLAY=(39:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(40,1,FS,NE,NUM),OVERLAY=(40:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(41,1,FS,NE,NUM),OVERLAY=(41:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(42,1,FS,NE,NUM),OVERLAY=(42:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(43,1,FS,NE,NUM),OVERLAY=(43:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(44,1,FS,NE,NUM),OVERLAY=(44:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(45,1,FS,NE,NUM),OVERLAY=(45:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(46,1,FS,NE,NUM),OVERLAY=(46:C' '),     
               HIT=NEXT),                                   
       IFTHEN=(WHEN=(47,1,FS,NE,NUM),OVERLAY=(47:C' '))   
/*                                                             
//                                                   
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Feb 14, 2008 4:30 pm    Post subject:
Reply with quote

How about posting the sysout where the Syncsort error is shown?
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Thu Feb 14, 2008 4:50 pm    Post subject:
Reply with quote

Hi William,

Here it goes.

Code:

SYSIN :                                                   
 OPTION COPY                                               
 OUTREC IFTHEN=(WHEN=(31,1,FS,NE,NUM),OVERLAY=(31:C' '),   
                  *                                       
               HIT=NEXT),                                 
       IFTHEN=(WHEN=(32,1,FS,NE,NUM),OVERLAY=(32:C' '),   
               HIT=NEXT),                                 
       IFTHEN=(WHEN=(33,1,FS,NE,NUM),OVERLAY=(33:C' '),   
               HIT=NEXT),                                 
       IFTHEN=(WHEN=(34,1,FS,NE,NUM),OVERLAY=(34:C' '),   
               HIT=NEXT),                                 
       .
       .
       .
       IFTHEN=(WHEN=(45,1,FS,NE,NUM),OVERLAY=(45:C' '),
                HIT=NEXT),                               
       IFTHEN=(WHEN=(46,1,FS,NE,NUM),OVERLAY=(46:C' '),
               HIT=NEXT),                               
       IFTHEN=(WHEN=(47,1,FS,NE,NUM),OVERLAY=(47:C' '))

WER268A  OUTREC STATEMENT  : SYNTAX ERROR     
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000 
                       
                                 


Thanks
Agni.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 14, 2008 10:22 pm    Post subject:
Reply with quote

Hello,

When you posted the sysout info, the product release did not make it nto the post. It may help to know which release of the product you are running.

In additon to resolving the syntax error, i believe you may have an issue with the data as well.

Quote:
It starts from byte 31 and ends in 47
Are these all 1-byte numeric fields? If they are of multiple bytes that make up one value (i.e. say bytes 31-35 are a quantity) and those positions have 123#5, the current implementation plan would make this be "123 5" - which i believe would still be invalid.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Feb 15, 2008 2:12 am    Post subject:
Reply with quote

Agni,

NUM is supported in SyncSort for z/OS 1.3. Please verify that you are not running an earlier release.
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Fri Feb 15, 2008 2:36 pm    Post subject: Reply to: Problem in removing non-numeric characters.
Reply with quote

Hi All,

I understood my requirement wrongly and i gave it wrongly in my post. Sorry about that. Actually if any of the one byte, from the byte 31 to 47 contains non-numeric character, then spaces should be moved to 31-47. This is my actual requirement. Can any one of you give SORT card for this,please?

Thanks
Agni
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Feb 15, 2008 2:56 pm    Post subject:
Reply with quote

Hi Agni,

Please check with the following code for your requirement.
Code:
// EXEC PGM=SORT                                       
//SYSOUT DD SYSOUT=*                                   
//SORTIN DD DSN=INFILE,DISP=SHR                                         
//SORTOUT DD DSN=OUTFILE,DISP=...                                 
//SYSIN DD *                                           
 OPTION COPY                                           
 INREC IFTHEN=(WHEN=(31,17,FS,NE,NUM),OVERLAY=(31:17X))
/*                                                     
//                                                     

Thanks,
Shankar
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Feb 19, 2008 9:21 am    Post subject: Reply to: Problem in removing non-numeric characters.
Reply with quote

Hi Alissa,

Syncsort version in my shop is "SYNCSORT FOR Z/OS 1.2.2.2R". Is there any other way of achieving my requirement?

Thanks
Agni
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Feb 20, 2008 5:33 am    Post subject: Reply to: Problem in removing non-numeric characters.
Reply with quote

Agni,

Did you try submitting the SORT jcl posted by shankar?
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Wed Feb 20, 2008 4:48 pm    Post subject:
Reply with quote

Hi Agni,
Quote:
Syncsort version in my shop is "SYNCSORT FOR Z/OS 1.2.2.2R". Is there any other way of achieving my requirement?

Please check with the following code for your requirement.
Code:
// EXEC PGM=SORT                                       
//SYSOUT DD SYSOUT=*                                   
//SORTIN DD DSN=INFILE,DISP=SHR                                         
//SORTOUT DD DSN=OUTFILE,DISP=...                                 
//SYSIN DD *                                           
 OPTION COPY                                     
 INREC IFTHEN=(WHEN=(31,01,SS,NE,C'0123456789',OR,
                     32,01,SS,NE,C'0123456789',OR,
                     33,01,SS,NE,C'0123456789',OR,
                     34,01,SS,NE,C'0123456789',OR,
                     35,01,SS,NE,C'0123456789',OR,
                     36,01,SS,NE,C'0123456789',OR,
                     37,01,SS,NE,C'0123456789',OR,
                     38,01,SS,NE,C'0123456789',OR,
                     39,01,SS,NE,C'0123456789',OR,
                     40,01,SS,NE,C'0123456789',OR,
                     41,01,SS,NE,C'0123456789',OR,
                     42,01,SS,NE,C'0123456789',OR,
                     43,01,SS,NE,C'0123456789',OR,
                     44,01,SS,NE,C'0123456789',OR,
                     45,01,SS,NE,C'0123456789',OR,
                     46,01,SS,NE,C'0123456789',OR,
                     47,01,SS,NE,C'0123456789'), 
 OVERLAY=(31:17X))
/*
//                               

Thanks,
Shankar
Back to top
View user's profile Send private message
skrishnavijay

New User


Joined: 26 Sep 2007
Posts: 25
Location: chennai

PostPosted: Thu Feb 21, 2008 2:10 pm    Post subject:
Reply with quote

Hi Agni,

Please find below the fileaid routine that I got from the posts.

//STEP0001 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=INPUT DATASET
//DD01O DD DSN=OUTPUT DATASET,
// DISP=(NEW,CATLG,DELETE),
// RECFM=..,LRECL=....,
// SPACE=....,UNIT=SYSDA
//SYSIN DD *
*
$$DD01 COPY IF=(31,17,EQN)
/*

Thanks,
Krishna
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Feb 26, 2008 6:13 pm    Post subject: Reply to: Problem in removing non-numeric characters.
Reply with quote

Hi Shankar,

I tried your code. But it is not working properly. Please see below.

This is in the input file.
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
                              9155-04754-09-43/
                                    1499****65/


I am getting in the output file as:

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
                                           -43/
                                           *65/


Please correct me if i have done something wrong.

Thanks
Agni
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Feb 26, 2008 6:21 pm    Post subject: Re: Reply to: Problem in removing non-numeric characters.
Reply with quote

Agni wrote:
I tried your code. But it is not working properly.
Is the file VB?
If it is, you need to add four to the dusplacements.....35 to 51.....
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Wed Feb 27, 2008 3:22 pm    Post subject: Reply to: Problem in removing non-numeric characters.
Reply with quote

Hi,

Yes, it's a VB file. I tried it and it worked fine. Thanks all.

Cheers
Agni.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am

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