MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
sharada Beginner Joined: 24 Aug 2005 Posts: 32 Topics: 14 Location: Hyderabad
Posted: Tue Jun 19, 2007 3:47 am Post subject: Can we have numeric check in SORT card ?
Hi All,
I have a file of length 80 bytes. I want to include only those records which have numeric data from 1 to 10 bytes.
Is there any method for numeric check in sort? I use sync sort not DF sort.
Input file:
1234567890alphanumeric
alphanumeric1234567890
Output file should be:
1234567890alphanumeric
Your time and efforts are appreciated. _________________ Regards,
Sharada.
Always perform your duty efficiently and without any selfish attachment to the results,
because by doing work without attachment one attains Supreme.
Back to top
krisprems Beginner Joined: 13 Dec 2006 Posts: 101 Topics: 4 Location: india
Posted: Tue Jun 19, 2007 5:23 am Post subject:
sharada
"Alphanumeric" means, do you have anything other than A-Z? _________________ cHEERs
krisprems
Back to top
sharada Beginner Joined: 24 Aug 2005 Posts: 32 Topics: 14 Location: Hyderabad
Posted: Tue Jun 19, 2007 6:07 am Post subject:
Yes, I may have. _________________ Regards,
Sharada.
Always perform your duty efficiently and without any selfish attachment to the results,
because by doing work without attachment one attains Supreme.
Back to top
dbzTHEdinosauer Supermod Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Tue Jun 19, 2007 6:16 am Post subject:
krisprems wrote: "Alphanumeric" means, do you have anything other than A-Z?
krisprems , I hope not.
sharada ,
This is DFSORT, maybe start with this: Code:
INCLUDE COND=(1,10,ZD,EQ,NUM)
_________________ Dick Brenholtz
American living in Varel, Germany
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Jun 19, 2007 6:30 am Post subject:
sharada,
Note that you need z/OS DFSORT V1R5 PTF UK90007 or DFSORT Release 14 PTF UK90006 to be able to use the parm NUM
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
sharada Beginner Joined: 24 Aug 2005 Posts: 32 Topics: 14 Location: Hyderabad
Posted: Tue Jun 19, 2007 6:32 am Post subject:
Not working. _________________ Regards,
Sharada.
Always perform your duty efficiently and without any selfish attachment to the results,
because by doing work without attachment one attains Supreme.
Back to top
sharada Beginner Joined: 24 Aug 2005 Posts: 32 Topics: 14 Location: Hyderabad
Posted: Tue Jun 19, 2007 6:33 am Post subject:
Yes Kolusu, that's why the sort is failing. _________________ Regards,
Sharada.
Always perform your duty efficiently and without any selfish attachment to the results,
because by doing work without attachment one attains Supreme.
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Jun 19, 2007 6:37 am Post subject:
sharada wrote: Not working.
Sharada,
You know when you say something isn't working you need to show us the sysout messages and may be we can suggest an alternate solution. You are just wasting time our time as well as your time with 1 line responses.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
dbzTHEdinosauer Supermod Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Tue Jun 19, 2007 6:45 am Post subject:
He has Syncsort. DFSORT supports NUM but Syncsort doesn't. _________________ Dick Brenholtz
American living in Varel, Germany
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Jun 19, 2007 6:54 am Post subject:
Sharada,
If you have File-aid in your shop you can try this
Code:
//STEP0050 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD *
1234567890ALP1234MERIC
345HANUMERIC1234567890
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 COPY IF=(1,10,EQN)
/*
The following are formats for numeric checking
Code:
EQP Equal packed
NEP Not equal packed
EQN Equal numeric
NEN Not equal numeric
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
CICS Guy Intermediate Joined: 30 Apr 2007 Posts: 292 Topics: 3
Posted: Tue Jun 19, 2007 7:34 am Post subject:
Any sort has the omit cond=((1,1,ch,lt,0,or,gt,9),or,(2,1,....
Syncsort has the substring (SS) which could simplify things....
Back to top
krisprems Beginner Joined: 13 Dec 2006 Posts: 101 Topics: 4 Location: india
Posted: Tue Jun 19, 2007 7:49 am Post subject:
sharada
Check this code
Code: //*******************************************************
//STEP001 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
00010360000000054924
0SDFASDF000000000000
00XCV030000000046154
00C20030000000046154
00X20030000000016693
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,1,SS,EQ,C'0123456789',AND,
2,1,SS,EQ,C'0123456789',AND,
3,1,SS,EQ,C'0123456789',AND,
4,1,SS,EQ,C'0123456789',AND,
5,1,SS,EQ,C'0123456789',AND,
6,1,SS,EQ,C'0123456789',AND,
7,1,SS,EQ,C'0123456789',AND,
8,1,SS,EQ,C'0123456789',AND,
9,1,SS,EQ,C'0123456789',AND,
10,1,SS,EQ,C'0123456789')
/*
SORTOUT:
Code: 00010360000000054924
_________________ cHEERs
krisprems
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum