View previous topic :: View next topic
|
Author |
Message |
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
samuel_Inba
New User
Joined: 03 Jan 2008 Posts: 53 Location: Chennai
|
|
|
|
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 |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
Thanks Sam...will try and get back. |
|
Back to top |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
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 |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Deepak,
Good to hear that it is now working - than you for posting the update
d |
|
Back to top |
|
|
|