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
 
SYNCSORT check for character in a numeric field and replace

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

New User


Joined: 14 Jan 2008
Posts: 3
Location: india

PostPosted: Tue Jan 15, 2008 7:30 pm    Post subject: SYNCSORT check for character in a numeric field and replace
Reply with quote

I want to check if a character is present in a 8 byte numeric field using SYNCSORT. If a character is found then move c'00000000' in that field. else keep it as it is.
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jan 15, 2008 9:56 pm    Post subject:
Reply with quote

Code:
//*******************************************************
//STEP1    EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                           
12345678                                                 
A23456 8                                                 
12345678                                                 
123456 8                                                 
12345678                                                 
12345678                                                 
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                       
  INREC IFTHEN=(WHEN=(1,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'),
        OVERLAY=(1:8C'0')),                               
        IFTHEN=(WHEN=(2,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'),
        OVERLAY=(1:8C'0')),                               
        IFTHEN=(WHEN=(3,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'),
        OVERLAY=(1:8C'0')),                               
        IFTHEN=(WHEN=(4,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'), 
        OVERLAY=(1:8C'0')),                               
        IFTHEN=(WHEN=(5,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'), 
        OVERLAY=(1:8C'0')),                               
        IFTHEN=(WHEN=(6,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'), 
        OVERLAY=(1:8C'0')),                               
        IFTHEN=(WHEN=(7,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'), 
        OVERLAY=(1:8C'0')),                               
        IFTHEN=(WHEN=(8,1,SS,NE,C'0,1,2,3,4,5,6,7,8,9'), 
        OVERLAY=(1:8C'0'))                                 
/*                                                         


SORTOUT
Code:
12345678 
00000000 
12345678 
00000000 
12345678 
12345678 
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: Tue Jan 15, 2008 10:14 pm    Post subject:
Reply with quote

piyush_katariya,

If you happen to have access to DFSORT, you can use the NUM function to do this more easily as follows (note that the NUM function is not available with Syncsort):

Code:

//STEP1    EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD *                                           
12345678                                                   
A23456 8                                                   
12345678                                                   
123456 8                                                   
12345678                                                   
12345678                                                   
//SORTOUT  DD SYSOUT=*                                     
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                         
  INREC IFTHEN=(WHEN=(1,8,FS,NE,NUM),OVERLAY=(8C'0'))     
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Jan 23, 2008 4:31 am    Post subject:
Reply with quote

Frank Yaeger wrote:
(note that the NUM function is not available with Syncsort)

SyncSort for z/OS 1.3, which is now generally available, supports the NUM function.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Jan 23, 2008 1:02 pm    Post subject:
Reply with quote

Alissa Margulies wrote:
SyncSort for z/OS 1.3, which is now generally available, supports the NUM function.

Alissa, can you also mention the other features that are available as a part of SyncSort for z/OS 1.3
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Jan 23, 2008 9:01 pm    Post subject:
Reply with quote

krisprems wrote:
Alissa, can you also mention the other features that are available as a part of SyncSort for z/OS 1.3

For the complete SyncSort for z/OS 1.3 Summary of Changes, you can go to http://syncsort.lyris.net/t/654/928821/151/0/
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jan 24, 2008 1:33 am    Post subject:
Reply with quote

Thanks for the info Alissa
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Jan 24, 2008 3:29 am    Post subject:
Reply with quote

Alissa Margulies wrote:
SyncSort for z/OS 1.3, which is now generally available, supports the NUM function.


Thanks! I'll ask to my systemers for that version...we are in 1.2.
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
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