Please describe the context. The only “EHR” I can think of would be Electronic Health Records, but there is no “HER” that seems related to it. — Tom
You would use SQL statements to access SQL data. Are you trying to learn SQL? Or do you have a specific business problem you need to solve? — Tom
We can suggest schools that teach fundamentals. Where are you located? There are also on-line schools and tutorials if necessary. — Tom
It doesn’t seem to be academic, since both members have submitted a series of questions that all seemed valid. But they are certainly the “same” question, so they shouldn’t be handled separately.
.
I can think of two general possibilities. The first would be an interview problem with various applicants working up solutions. The other possibility can be explained by the OP.
.
Please describe the business problem that this will solve.
.
Tom
The file has create timestamp. Are you auditing for *CREATE events? Does the audit journal help point to the creation program? Is the “higher” library a SQL collection or a normal library? Is it directly related to the user ID? (It doesn’t seem like it would be from your description.) Was all work done in STRSQL? — Tom
Meant chgusrprf since its in a prgram then use a variable
If all the data is in one spreadsheet, get that to a file on the AS400.
Declasre the file in your CL (DCLF)
Use RCVF to read the records from your file.
Use CHGUSRPF to adjust the values to waht is in the file.
Make sure the program is run by a USRPRF that has the authority required to make the changes.
Sounds like a homework question… I saw another post asking for same info…
Show us what you tried and we can point you in the right direction.
Please note, I do not and have never worked for Microsoft. Just curious about your opinions on Azure.
yeah, I thought of that, but his session is still set fro the default QGPL/QSQLSELECT and that output redirection only works for select statements; updates, etc run as they are supposed to
thanks for any suggestions though…
Very unlikely but it’s about the only way I can think of ..
.. Interactive sql .. change session attributes .. Select output .. 3.. to a file
.. system holds these values from previous session.
Output file ..must be specified .. library must be specified .. then select will create duplicate file based on selection rules.
Phil
Short of a create table command.
http://www.itjungle.com/fhg/fhg032311-story01.html
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







