Get answers.  Share knowledge.  Collaborate with peers.




HER

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



View Discussion   |  April 19, 2013  12:39 AM
EHR, Electronic records
discussed by:
TomLiotta
108,135 pts.

Access

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



View Discussion   |  April 19, 2013  12:15 AM
SQL Database, VB .NET
discussed by:
TomLiotta
108,135 pts.

Types of data

We can suggest schools that teach fundamentals. Where are you located? There are also on-line schools and tutorials if necessary. — Tom



View Discussion   |  April 19, 2013  12:05 AM
Data, Data analysis
discussed by:
TomLiotta
108,135 pts.

Making changes in a user profile with a CL program

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



View Discussion   |  April 18, 2013  11:49 PM
AS/400, CL Program
discussed by:
TomLiotta
108,135 pts.

SQL creating an unwanted duplicate of file

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



View Discussion   |  April 18, 2013  11:34 PM
DB2, SQL statement
discussed by:
TomLiotta
108,135 pts.

Changing user profiles in a CL program

Meant chgusrprf since its in a prgram then use a variable



View Discussion   |  April 18, 2013  10:54 PM
CL Program, JOBD, QGPL
discussed by:
mrpopcorn
25 pts.

Changing user profiles in a CL program

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.



View Discussion   |  April 18, 2013  8:16 PM
CL Program, JOBD, QGPL
discussed by:
CharlieBrowne
32,905 pts.

Making changes in a user profile with a CL program

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.



View Discussion   |  April 18, 2013  7:20 PM
AS/400, CL Program
discussed by:
ToddN2000
3,915 pts.

Would you consider using Windows Azure Infrastructure Services?

Please note, I do not and have never worked for Microsoft.  Just curious about your opinions on Azure.



View Discussion   |  April 18, 2013  6:23 PM
Amazon Web services, AWS, IaaS, Windows Azure
discussed by:
Chris Leonard
2,620 pts.

SQL creating an unwanted duplicate of file

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…



View Discussion   |  April 18, 2013  5:34 PM
DB2, SQL statement
discussed by:
BigKat
7,185 pts.

SQL creating an unwanted duplicate of file

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



View Discussion   |  April 18, 2013  4:14 PM
DB2, SQL statement
discussed by:
philpl1jb
44,190 pts.

discussed by:
philpl1jb
44,190 pts.

SQL creating an unwanted duplicate of file

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!



View Discussion   |  April 18, 2013  4:04 PM
DB2, SQL statement
discussed by:
BigKat
7,185 pts.

SQL creating an unwanted duplicate of file

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.



View Discussion   |  April 18, 2013  3:55 PM
DB2, SQL statement
discussed by:
philpl1jb
44,190 pts.

SQL creating an unwanted duplicate of 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?



View Discussion   |  April 18, 2013  3:48 PM
DB2, SQL statement
discussed by:
philpl1jb
44,190 pts.

SQL creating an unwanted duplicate of file

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.



View Discussion   |  April 18, 2013  3:33 PM
DB2, SQL statement
discussed by:
BigKat
7,185 pts.

Position at which value is entered in a subfile

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



View Discussion   |  April 18, 2013  3:28 PM
AS/400, AS/400 Subfiles
discussed by:
philpl1jb
44,190 pts.

SQL creating an unwanted duplicate of file

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….



View Discussion   |  April 18, 2013  3:22 PM
DB2, SQL statement
discussed by:
philpl1jb
44,190 pts.

Date conversion

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



View Discussion   |  April 18, 2013  2:54 PM
AS/400, AS/400 Fields
discussed by:
philpl1jb
44,190 pts.

Message subfile

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



View Discussion   |  April 18, 2013  2:22 PM
AS/400, MSGF, QMHSNDPM
discussed by:
bvining
6,055 pts.