i am getting data file from source which is | delimited.
need to count the number of delimiters from each record and if delimiter's count is plus one from other record's count then create seperate file and put record (which has plus one delimiter) in separate file and rest of the records in other file. could any one please suggest how it can be done?
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
pema_yozer,
use the following DFSORT JCL. I assumed the file to be FB recfm and 80 bytes length and the delimiter is semicolon. If your input has more than 10 delimiters it will be written to OUT2 and OUT1 file will have records with less than or equal to 10 delimiters
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
pema_yozer,
You could have saved a lot of your time as well as other people's time if you had specified your requirements clearly in the first post itself. Even now there is a guess work as to what the delimiter is.