Not able to DSEL records
Posted 08 January 2006 - 09:16 AM
Default logic : sel-only field1a
file1 : read this file ( field1a,field1b,,,,,,,)
file2 : read file2 with field1a (map to field2a), After read : if file2b(1,3) # 'abc' the DSEL exit
file3 : write records in file3 with fields of file1 and file2
file1 key is of length 5 bytes ie 3 (field1a) + 10(field1b).
file2 key is of length 5 bytes ie 3 (field2a) + 5(field2b).
file3 is having 'abc' records and also records whose feild2b is blank.
Can someone guide me here ?
Posted 08 January 2006 - 10:14 AM
LU1 SEL-ONLY (defines a set of records to be processed from File 1)
The list of files defines the processing for each record selected from the first file (file 01)
File 01 - read next record in the set
File 02 - nn process a single record with a fully defined set of keys. You must be able to fully specify the key on all 02-nn reads.
If you want to process a relationship with one-to many (e.g. order header to order lines) then you put in another LU.
LU1 (start LU1 end LU2) SEL-ONLY(field1a)
LU2 (start LU2 end LU2) field2a = field1A SEL-ONLY(field2a)
01 file2 (after read Dsel)
02 file3 add
Is this what you intend? I'm not quite sure what the relationship between your two files is. The two files share the same first part of the key, but have a different second part, so I'm not sure.
Posted 08 January 2006 - 10:12 PM
File 1 : SEL-ONLY On first part of key
File 2 : Direct read with all key values set from field values of file 1. DSEL on ARNE.
File 3 : Add record
The DSEL on file 2 is not catching everything you think? Is this right?
If this is the case I would suggest the problem is when you have a record in file 1 that has no corresponding record in file 2. That would account for the blank fields being added to file 3. In that case just put a DSEL in the ARE logic too.
If, on the other hand, file 2 is not a direct read based on values obtained from file 1 then see the previous post.
Posted 09 January 2006 - 11:02 AM
Because DSEL doesn't function in a paging screen - you need to
use a sort/select on files 1 & 2.
of the poster and do not represent those of any organisation.
Posted 09 January 2006 - 01:48 PM
now ARE is working. Before this i tried with dsel logic in file3 (before write for those blank records)
even i am able to validate the field and display the field as blank.
logic in before write for file3:
populate data for file3 .......
if file2b(1,3) = ' ' then umsg("file2b" + fiel2b,-1) dsel exit
file3 is seq. file , into which records are written. I didn't understand , what's wrong with the code, as it is working ie displaying the blank fields , but not able to stop records from writting ....
Posted 10 January 2006 - 07:36 AM
i was member of couple of mainframe forums,where i used to help others often and gained knowledge from some senior guys .
when i came to know that , i am about to work on pro iv for some business reasons , the first thing i was looking for is FORUM.
This forum is doing great. Thanks to all members for sharing their ideas and knowledge .
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users