it wasn’t discovered for an hour, but looking back as far as we can see the only thing that was done on that session was the SQL update. It is most vexing!
Half of my discussion responses are now disappearing!!!
Sounds like you’re certain that the problem started at the time of the SQL.
I’m sure you checked the creation date on both versions of the file.
And the copy couldn’t have existed before the SQL’s, perhaps long before ???
Cause your program are acting screwy with two copies of the data???
Whats the create date on the inappropriate one?
we tend to do select statements to verify the where criteria is for the records we want and any calculated result will be what we want, then run the update… and it makes no sense that the update would do it, but job logs show he didn’t create it any other “reasonable” method.
If by position you mean SFL relative record number .. then if you have the
F spec SFILE(recformat:rrnfield).
The rrnfield will contain the SFL relative record number that relates to the most recent successful READC.
Phil
no .. I’ve never seen an Sql UPDATE create a copy of a file.
However, I wouldn’t run an update without creating a copy of the file….
BigKat
That’s cool!
.. and change my *mdy0 to *dmy0
… In the discreate conversion each step could be monitored seperately so that we would know which date was invalid… but I’m sure the OP never has a bad date.
Phil
Also the article you reference is NOT saying APIs have bugs, rather that the API was reporting back an error in how the API was called (bad or inconsistent parameter values, the article didn’t really say that I noticed). The bug was in the user code not checking if the API was reporting an error — which is what the remainder of the article addressed (how to check for errors).
An analogy would be a RPG program doing a CHAIN with indicator 99 specified for Record not found and then having the RPG program not check if *in99 was on after the chain operation. This would not be considered a RPG compiler or run-time defect
Is the code under development small enough to send me a copy (along with anything needed to run it)? The initial problem sounded like some routine in the code stomping on storage, the new problem sounds like the wrong call stack entry is being referenced. In any case, I’ll try to take a look if you can send it to me at bvining@brucevining.com (though no promises on when I’ll get to it)
As Tom mentioned, QMHSNDPM is a very heavily used API. So I really doubt that you have found such a strange series of bugs in the API itself
doh! the last “endif” should be “endmon”
monitor;
If %date(wISODateA : *dmy0 )>= %date(wISODate : *iso0)and %date(wISODateA : *dmy0 )<= %date(wISODate2 : *iso0);
…
endif;
on-error *all;
…
endif;
Could you give us a sample of some data from the original file and the desired output. Make the data representative of the range of issues.
tks Phil
It seams like this would work. Unless I’m confused again….
.
Create all three fields wDate1, wDate2, wDateA as date types
.
eval wDAte1 = %date(wISODate : *iso0)
eval wDAte2 = %date(wISODate2 : *iso0)
eval wDAteA = %date(wISODateA : *mdy0 )
If wDateA >= wDate1 and wDateA <= wDate2
.
.
But I would put it in a monitor block because if any of the character fields don't contain a valid date the function will throw an error.
.
Phil
First, are you expecting to create an Excel file, or do you intend to create .CSV files? — Tom
“Option 3. Use embedded SQL”
.
SQL doesn’t allow a CHAIN operation.
.
Tom
Without an example, I don’t know what you mean by “search any element using %lookup”. Generally, you don’t do lookups on multi-dimensional arrays. But if you’re asking about a kind of alternating array, then yes, you can do lookups on them.
.
Show your array definition and describe what is in it. Then describe how you need to search through it.
.
Tom
And is the problem solved already or not? If the answer is yes what was the solution. It is nice toe share the solution for users who have the same problem
Are you sure that the file exist and is on that place?
You can create a single CL program that to do the transfers. IT is still one file at a time, Or that one CL program could submit multiple batch jobs.
What process are you using today to do the transfers?
The CPU drops down to 2% normally a 15% during the operation. I watch the last modify date and it was 5 days before i start the back-up. I don’t know the problem but I had restart the operation and after checking for change files rsync reach that one file where it hangs but this time it just back-up it without any problem and the back-up operation. Maybe the reason was the virtual machine. It could be that this machines network interface had some problems when it runs on maximum for hours







