IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to check non-numeric data in a file from JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Mon Oct 20, 2008 8:44 pm
Reply with quote

Hi All,
I have an urgent requirement.

Step 1 in my job creates a new generation of a GDG and call a program which updates the new generation with a record which should idelly have a numeric value.
in Step 2, I need to check if the new generation has a numeric value, else I'll have to delete that generation.

How do I achieve this through JCL? pls help me
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Oct 20, 2008 8:49 pm
Reply with quote

Quote:

in Step 2, I need to check if the new generation has a numeric value, else I'll have to delete that generation.


What is layout of the file?
is there any specific field to be checked for numeric?
Post sample data for GDG generation created in your step1...
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Mon Oct 20, 2008 9:50 pm
Reply with quote

Here is the layout

Organization . . . : PS
Record format . . . : FB
Record length . . . : 9
Block size . . . . : 27990

We need to check the whole 9 bytes to be numeric and delete accordingly.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Oct 20, 2008 11:35 pm
Reply with quote

Deepak,

Can you post here which sort product you are using-DFSORT or Syncsort? You can see the product release info in the SYSOUT of any job run.
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Tue Oct 21, 2008 12:24 am
Reply with quote

Here is the details from my SYSOUT

SYNCSORT FOR Z/OS 1.3.0.0R U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSO
**** VERIZON **** z/OS 1.9.0


***CPU Number is been removed***..Anuj
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Oct 21, 2008 7:03 am
Reply with quote

Deepak,

Thanks for posting the info.

How many records do you have in your input file that is to be verified? What would be your expected result, if the file is having more than one record?
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Tue Oct 21, 2008 8:45 am
Reply with quote

I have only one record in this file always. I just have to read that record which is of 9 bytes and check if it is numeric. If non numeric delete that file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Oct 21, 2008 9:07 am
Reply with quote

Hello,

I'd suggest not creating the new generaton until after the numeric has been successfully validated.

Actually, i see no need to read/validate the number. If code is creating it, there is no reason to check it - simply create it numeric. . .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Oct 21, 2008 11:04 am
Reply with quote

deepak.vl wrote:
Hi All,
I have an urgent requirement.

It may be urgent for you, but not for anyone else on the forum.

deepak.vl wrote:

Step 1 in my job creates a new generation of a GDG and call a program which updates the new generation with a record which should idelly have a numeric value.
in Step 2, I need to check if the new generation has a numeric value, else I'll have to delete that generation.

This sort of makes me think of Monty Python and the ministry of silly walks. Have we now created a ministry of silly requirements ?

deepak.vl wrote:

How do I achieve this through JCL? pls help me

You don't. JCL is merely the vehicle of communicating to the machine what program and files to use. It is the selected program that actually does the work.
Back to top
View user's profile Send private message
samuel_Inba

New User


Joined: 03 Jan 2008
Posts: 53
Location: Chennai

PostPosted: Tue Oct 21, 2008 12:41 pm
Reply with quote

hi Deepak,
u can chk for non-numeric using ice tools facility ... In ice tool u can specify the location which u need to verfiy.
the syntax is:

include cond=(start pos, length,format,NE,Num) - this will get u the file which has the list of records which has non-numeric data.

E.g: (1,9,BI,PD,NUM).

Try it out ..


Regards,
Sam.
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Tue Oct 21, 2008 6:05 pm
Reply with quote

Thanks Sam...will try and get back.
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Tue Oct 21, 2008 6:09 pm
Reply with quote

deepak.vl wrote:

Step 1 in my job creates a new generation of a GDG and call a program which updates the new generation with a record which should idelly have a numeric value.
in Step 2, I need to check if the new generation has a numeric value, else I'll have to delete that generation.

This sort of makes me think of Monty Python and the ministry of silly walks. Have we now created a ministry of silly requirements ?

No, We did not. Actually the file getting created has been there since few years. and its a huge and complex code. Recently there are few instances where the data coming out to it is junk. We donot want to touch the code that has been there since few years. We just want to check after the step to check if the data that has is numeric and if not delete the generation created.
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Tue Oct 21, 2008 6:13 pm
Reply with quote

hey all, fyi.
I did handle this scenario and here is what it is.
before writing the file...I am checking it has to be numeric. And in the next step check if the file is empty and if so, delete it.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Oct 21, 2008 10:04 pm
Reply with quote

Hello Deepak,

Good to hear that it is now working - than you for posting the update icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top