Get answers.  Share knowledge.  Collaborate with peers.




XP client eventually loses network connection

Do the event logs show anything useful? What is the time range the systems seem to stay connected in? — Tom



View Discussion   |  April 19, 2013  10:22 AM
Network, Windows XP 32 bit
discussed by:
TomLiotta
108,310 pts.

How to use SETLL and READE to solve this program

Since SETLL and READE don’t make sense to use for this, and since you are restricted from using SQL as a solution, it seems very much like an academic assignment. You need to show the code you have worked out first, then we can possibly comment on your code. We can’t provide code for you. — Tom



View Discussion   |  April 19, 2013  10:07 AM
AS/400, Physical File
discussed by:
TomLiotta
108,310 pts.

24 digit number: Arithmetic operations?
Yes, that should have been “precision AND scale”. Typos happen, and this editor doesn’t help. To demonstrate further, I changed my test COBOL function to issue a COMPUTE against a S9(25)v9(25) decimal variable. The debug EVAL of the variable now shows:
Debug . . .
.
F3=End program   F6=Add/Clear breakpoint   F10=Step   F11=Display variable
F12=Resume       F17=Watch variable   F18=Work with watch   F24=More keys 
BIG-NBR = 0000000000000000000000052.0000000000000000000000000
If it’s still not big enough, I can make both precision AND scale have more digits. And that’s still V5R3. I still haven’t heard why you are having a problem. This function of mine is just a small test program that I had available. I modified it to shove a big number into it to show it could be done.
.
This is the entire program:
       PROCESS APOST NOPRTCORR
               DATE
               TIME
               TIMESTAMP
               CVTTODATE
               VARCHAR
       Identification Division.
       Program-ID.      TST2    .
.
       Environment Division.

       Configuration Section.
       Source-computer.    IBM-AS400.
       Object-computer.    IBM-AS400.
.
       Data Division.
       File Section.
.
       Working-storage Section.
.
           EXEC SQL
              INCLUDE SQLCA
           END-EXEC.
.
       77  big-nbr                 pic s9(25)v9(25) comp-3.
.
       01  HOST-VARS.
           05 iCnt                 pic s9(18) binary.
           05 iTot                 pic s9(5) comp.
           05 minFile              pic x(10).
           05 maxFile              pic x(10).
.
       Procedure Division.
.
       00-Main-driver.
.
           EXEC SQL
                SELECT COUNT(*), SUM(APNKYF), MIN(APFILE), MAX(APFILE)
                    INTO :HOST-VARS
                    FROM ACCPTH
           END-EXEC.
.
           compute big-nbr = iCnt
.
           goback.
.
       00-Main-driver-exit.  exit.
I know it has embedded SQL, but that has no effect on the COBOL. If you wish, you can create file ACCPTH by running DSPFD TYPE(*ACCPTH) to an *OUTFILE.
.
It still isn’t clear where you are having a problem. Numbers this big just aren’t an issue for any recent COBOL. An older AS/400 might have trouble, but no IBM i release would.
.
Tom


View Discussion   |  April 19, 2013  9:58 AM
COBOL/400, IBMi, RPG
discussed by:
TomLiotta
108,310 pts.

How to use SETLL and READE to solve this program

i agreed with you, but i have to do without using sql. Only loops and flags and setll and read.



View Discussion   |  April 19, 2013  9:25 AM
AS/400, Physical File
discussed by:
rpglecodingusingas400
115 pts.

rpg/400

by using %CHAR building function



View Discussion   |  April 19, 2013  9:22 AM
RPG, RPG/400
discussed by:
dwivediviv
10 pts.

How to use SETLL and READE to solve this program

You could use SETLL and READE, but it doesn’t make much sense. Those don’t fit the problem well at all. The simplest is probably just to run a basic SQL statement:

insert into FILEB
   select
       A, max(B), max(C)
     from FILEA
     where C ='Y'
   group by A
   order by A
That’s all that’s needed and it’s a much better fit then SETLL can be. If FILEB doesn’t exist, you can use a CREATE TABLE FILEB AS result-set WITH DATA statement instead of an INSERT. Use the SELECT statement as the result-set.
.
Tom


View Discussion   |  April 19, 2013  9:00 AM
AS/400, Physical File
discussed by:
TomLiotta
108,310 pts.

Show error message to user after a CPYF command ended in error in CL program

It depends on how the program runs. Does the program have a display file it will display the message in? If not, how is it expecting any control over what messages display at all, much less where they display or what the format will be?
.
There are multiple options. Maybe the best option to start with is not to use CPYF for this. If you are copying source file members, consider using CPYSRCF instead. The intention is clearer.
.
Tom



View Discussion   |  April 19, 2013  8:10 AM
AS/400, CL Program
discussed by:
TomLiotta
108,310 pts.

24 digit number: Arithmetic operations?

Maybe you should try to find out the difference between maximum size and maximum precision.



View Discussion   |  April 19, 2013  7:48 AM
COBOL/400, IBMi, RPG
discussed by:
gast951
75 pts.

How to use SETLL and READE to solve this program

data is like this:

10 1 N
11 1 Y
11 2 Y *
13 1 N
14 1 N
14 2 Y
14 3 Y *
15 1 Y *



View Discussion   |  April 19, 2013  7:11 AM
AS/400, Physical File
discussed by:
rpglecodingusingas400
115 pts.

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,310 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,310 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,310 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,310 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,310 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,915 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,200 pts.