Posted: Mon Mar 28, 2005 11:13 am Post subject: Sort in Cobol giving Empty file..
Dear Friends,
I have this Program PGMA which takes one two input files FDES and FUNL. These are DDNAMES and the file name used in program are
FDES-FILE and FUNL-FILE.
The program Sorts these files based on some Keys and writes back to the same files.
Now for FUNL i have no Issues. But with FDES i have this queer problem with sort.
The Number of records in FDES is 108889 and in FUNL is 119845.
Now after the program is executed the FUNL is sorted and is Updated.
the SORT-FDES-FILE is having a Blank record and control goes to the part where sorting of FUNL file. But the Input FDES file is having data not a blank record. When i run with less number of records then it goes fine. but the FUNL file has more records than that of FDES and excatly same kind of code excutes the sort for FUNL ( though the data is different ). And for FUNL there is no issue.
I thought okay in this bulk data i may have some Blank record some where so i Splitted the file FDES into some parts and i ran and all runs went fine.
I increased the SORTWKXX from 01 to 99 and i have the maximum space allocation also as given below :-
No Effect.Still when i give the original FDES file as input with Full data the Output FDES is empty after update from the program.
I cannot assume it as a Limitation for Sort as FUNL has more records and also it had six keys to sort. Also the FDES sort runs fine when i give it is small pieces.
As i have mentioned when i spilt the file into chunks and then run , then i do not have an issue. If i run the file in chunks for each chunk then in Xpediter i have noticed as i cross the SORT verb i have data in SORT-FDES-FILE. But when i run it as a whole i am getting a Blank record first in
SORT-FDES-FILE.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Mar 30, 2005 2:55 pm Post subject:
karunkallore,
You said your input file is a Variable block file? Did you account for additional 4 bytes when calculating the relative pos of KEY6 ?
Also here is an explanation of WER135I
Code:
WER135I TASK CALL/E35 TERMINATED PREMATURELY
EXPLANATION: An E35 exit routine (COBOL Output Procedure) passed a
return code of 8, terminating the sort before the sort was able to pass
all of the records. A SORTOUT data set was not present.
This message may not indicate an error condition - it depends on
what the programmer intended. For example, this message will be
generated if a COBOL program using the SORT verb RELEASEs 100 records in
the Input Procedure without RETURNing all 100 records in the Output
Procedure because the logic dropped to the bottom of the Output Procedure
"prematurely". If this is what the programmer intended, then no
data has been lost. If, however, the programmer intended the
Output Procedure to write all the records read in the Input
Procedure, then this message indicates a logic bug in the COBOL program.
Posted: Wed Mar 30, 2005 4:07 pm Post subject: VB is considered...
Hello,
The same program works fine when this file FDES is spilt into two three parts. Then also the same VB is used. Both the Input and Output files are VB. As i already mentioned i did an Xpediter test on it using the Iput file giving me this issue. Here the control comes to this part of the code (given below ), To be specific the first statement (SORT SORT-FDES-FILE ) and Stops for some time then proceeds to 3000-FDES-OUTPUT . Here i had kept a KEEP on SORT-FDES-FILE . It was blank in the beginning of the program and after reading the code 'SORT SORT-FDES-FILE' it is still blank. But when i split this file and run seperately there is no issue and after this statement 'SORT SORT-FDES-FILE ' in Xpediter SORT-FDES-FILE has data and all processing goes fine.
What amazes me is that the Other File that i had mentioned FUNL is having more records than this FDES, it is also both VB ( for Input and Output ) and it also has same 6 keys. It also has similar check before writing to the output file. Still no issues in that. But for this file FDES , it has data before the program is excuted but after it has the file is empty.
Please help me out to understand this. If any other inputs is required i am all there for all.
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