Search found 7 matches

by Vishwanath G N
Fri Apr 19, 2013 1:05 am
Forum: TSO, CLIST & REXX
Topic: Dividing a file.
Replies: 1
Views: 2909

Dividing a file.

Hi All, I have a file lets say with 990 records. I want to divide it into separate files with 100 records each and last few records in one file. How can I do it using rexx. Currently I am just reading the records in a stem with do loop I am segregating 100 records and writing them. Is there any othe...
by Vishwanath G N
Thu Apr 18, 2013 11:22 pm
Forum: TSO, CLIST & REXX
Topic: Unstring a record using REXX
Replies: 4
Views: 8003

I am able to get 8th value but it is coming with " ie "24244"
I am unable to remove " in parse itself.
by Vishwanath G N
Thu Apr 18, 2013 8:32 pm
Forum: TSO, CLIST & REXX
Topic: Unstring a record using REXX
Replies: 4
Views: 8003

Unstring a record using REXX

Hi All,

I have a file with records in below format.
6,"1","",45,4567,"","QW3454","23244","23424",23423',


I want to read 5th and 8th value from all the records. Ie 4567 and 23244 and write these two values in a new file.


Can someone please guide me on how this can be done using REXX.
by Vishwanath G N
Wed Apr 17, 2013 9:44 am
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Using Timestamp in Update query
Replies: 1
Views: 3032

Using Timestamp in Update query

Hi All, I want to update a column in the table to mmdd . Example: If i want the value to be 0416(MMDD) for today,I can get this by below select query select substr(digits(month(current timestamp)),9,2)||substr(digits(day(current timestamp )),9,2) from sysibm.sysdummy1 with ur; But how would i accoma...
by Vishwanath G N
Wed Apr 17, 2013 9:28 am
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Select Data from table based on File Input
Replies: 5
Views: 9057

My question was , Is there any db2 utility which would read a input file(Control card or Sysrec),fetch the records for all these input values and write the same onto the file. Currently I am doing the below steps and wanted to know if something better can be done Step1: Create a header file with bel...
by Vishwanath G N
Tue Apr 16, 2013 5:02 am
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Select Data from table based on File Input
Replies: 5
Views: 9057

Thanks a lot Nicc.Sure I would follow and select only the columns required else it would be a overhead for DB2.

At this point then i will stick on to the below method
-->Create SQL first through sort
-->Execute this SQL
by Vishwanath G N
Mon Apr 15, 2013 9:11 am
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Select Data from table based on File Input
Replies: 5
Views: 9057

Select Data from table based on File Input

Hi All, I have got a requirement where i need to read values from the file and select data from db2 table based on this. I can do it through a simple cobol-db2 program but i wanted to acheive this through any of db2 Utilty/JCL. Example : Sample File Col1 Col2 AA BBB CC DDD I should select data from ...