Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Need to check non-numeric data in a file from JCL
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    Post subject:
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    Post subject: Reply to: Need to check non-numeric data in a file from JCL
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: 2171
Location: @my desk

PostPosted: Mon Oct 20, 2008 11:35 pm    Post subject:
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    Post subject: Reply to: Need to check non-numeric data in a file from JCL
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: 2171
Location: @my desk

PostPosted: Tue Oct 21, 2008 7:03 am    Post subject:
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    Post subject: Reply to: Need to check non-numeric data in a file from JCL
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

Site Director


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

PostPosted: Tue Oct 21, 2008 9:07 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 21, 2008 11:04 am    Post subject: Re: Need to check non-numeric data in a file from JCL
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    Post subject: Reply to: Need to check non-numeric data in a file from JCL
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    Post subject: Reply to: Need to check non-numeric data in a file from JCL
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    Post subject: Re: Need to check non-numeric data in a file from JCL
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    Post subject: Reply to: Need to check non-numeric data in a file from JCL
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

Site Director


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

PostPosted: Tue Oct 21, 2008 10:04 pm    Post subject: Reply to: Need to check non-numeric data in a file from JCL
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    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
This topic is locked: you cannot edit posts or make replies. Unwrap the data based on delimiter X'25' bhavana yalavarthi DFSORT/ICETOOL 30 Fri Dec 09, 2016 10:25 am
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us