Posted: Fri Feb 17, 2017 2:15 am Post subject: A scan of the production database on particular segment
A scan of the production database is needed on the particular segments. We have a condition that If the SYSTOLIC entry is numeric, then the associated DIASTOLIC should be numeric as well. Other way around as well. The requirement is to check whether there are any values not satisfying this condition in database. The particular part is defined as below.
Is there any way to get the list of records not matching the criteria mentioned into a file. Using JCL or Fileman Batch or easytrieve. Please give sample jcl/program. _________________ Thanks
TVSSV
Joined: 26 Nov 2002 Posts: 12359 Topics: 75 Location: San Jose
Posted: Fri Feb 17, 2017 11:50 am Post subject:
tvssv,
You say segments and database in the same sentence. Do you have a DB2 table or IMS database?
If it is a DB2 table, you can use SQL to translate the decimal fields to null value and see if you get an empty string.
Or alternatively you can unload the data into a sequential file and use utility like DFSORT to filter out the records with NUM test on INCLUDE COND. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
The database is IMS DB. Now I have retrieved the required segment to a file. The file is in VB format.
We have a condition that If the SYSTOLIC entry is numeric, then the associated DIASTOLIC should be numeric as well. Other way around as well. The requirement is to check whether there are any values not satisfying this condition. The particular fields are defined as below.
The fields are in packed decimal format. Could you please provide the sort cards or any other way to check the fields and retrieve those records which are matching the criteria. That is if any of the fields are not numeric.
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
Posted: Mon Feb 20, 2017 9:17 am Post subject:
So, if I understand you correctly, the fact that the data is in an IMS database is (sort of) irrelevant. The data could just as easily be in a simple, sequential file and the same requirement would be true.
For example, you could write a Rexx script to access the database, but maybe you don't have the in-shop competence to do this.
I have downloaded the database to flat VB file. I need to check whether all the fields (PD) are numeric or not. If I found any non numberic data in the specified fields (please see the fields mention above) I need to write into new file. Please provide sort instructions to do this.
Joined: 26 Nov 2002 Posts: 12359 Topics: 75 Location: San Jose
Posted: Mon Feb 20, 2017 12:36 pm Post subject:
tvssv wrote:
Hi
Thank You.
I have downloaded the database to flat VB file. I need to check whether all the fields (PD) are numeric or not. If I found any non numberic data in the specified fields (please see the fields mention above) I need to write into new file. Please provide sort instructions to do this.
Thanks
tvssv,
You mean UNLOADED right? Please use the proper terms.
Now that you have unloaded the data into a VB file, the position of the data is displaced by 4 bytes as the first 4 bytes contain the RDW. so use the following JCL to filter the records. It will write 2 files, NUM and NOTNUM
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