Here my requirement is I have to check if the data in the field1 is alphabetic, numeric or alphanumeric accordingly I have to separate them into 3 dataset
Code:
Output should look like:
3 outputs:-
alphabetic.dataset:-
abcde
aaaaa
Is the data only in the first 5 positions of the records?
Yes Input file is having data only in the first 5 positions and remaining 75 bytes is blank space.
Code:
What about lower-case letters?
As an example I gave those input data. Whether it is lower or upper case in the output is not going to matter, only thing is I need to separate input on alphabetic, numeric and alphanumeric bases
All three output file is of record length=80 and recfm=f
hope I have provided required information if not please let me know.
Should lower-case characters be written to the alphabetic output or the alphanumeric output?
If the value has all numerics, it goes to NUM. If the value has all non-numerics, it goes to ALPHA. Otherwise (mixed numeric and non-numeric), it goes to ALPHANUM. Lower case is just a non-numeric like anything else that is not 0-9.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hi Frank,
Yup, that is what i expected ICEMAN to do.
From the original post, i read it a bit differently: A-Z = alpha, 0-9 = numeric, and the "rest" = a/n. I was just unsure where l/c should go (if any would even be in the input).
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
Frank Yaeger wrote:
If the value has all numerics, it goes to NUM. If the value has all non-numerics, it goes to ALPHA. Otherwise (mixed numeric and non-numeric), it goes to ALPHANUM. Lower case is just a non-numeric like anything else that is not 0-9.
Great, I would have been struggling with a long series of outrec includes and treated even the special characters and unprintables as alpha too.....
It takes a master to code that sweetly......