Get answers.  Share knowledge.  Collaborate with peers.




ASP Utilization

Note that if no one has ever set anything up to do this kind of tracking and reporting, then there is no easy way to check everything. A weekly RTVDSKINF and RTVDIRINF is a basic way to get tracking started. — Tom



View Discussion   |  April 30, 2013  1:03 AM
AS/400, ASP Utilization
discussed by:
TomLiotta
108,300 pts.

ASP Utilization

If there is concern about space, the RTVDSKINF command should be run each week, perhaps scheduled for late Friday or Saturday night whenever the activity on the system is small. (There is also RTVDIRINF and PRTDIRINF for more detailed information about directories and streamfiles. In many systems, most of the space is outside of the QSYS.LIB file system.) — Tom



View Discussion   |  April 30, 2013  1:00 AM
AS/400, ASP Utilization
discussed by:
TomLiotta
108,300 pts.

How do I copy a data base file to IFS directory

It depends on what you want to do with the streamfile that gets created and what kind of “database file” you have.
.
Use CPYTOIMPF if you are thinking of transferring data from an externally-described database file to another system in a format such as a .CSV file. This is probably the most common way to do it.
.
Use CPYTOSTMF if the database file is a source file or a single-field physical file that was created without DDS or SQL.
.
Only use CPYTOPCD if you understand why the command should be used. In the vast majority of cases, it should not be used.
.
You might also use the Qshell db2 utility and redirect its output to a streamfile. That allows you to choose which columns to copy, what order they should be in, what format the values should have and other details. (By piping the output through the sed utility, you can remove some extra lines that the db2 utility automatically inserts before putting output into a streamfile.)
.
And of course you can write programs in any language to read database records and write them to streamfile lines. That gives you total flexibility to do it in any form you need.
.
Tom



View Discussion   |  April 30, 2013  12:53 AM
AS/400 - CL Command
discussed by:
TomLiotta
108,300 pts.

Deleting SAVED journal receivers

Basic code in a CL program could center around something like this:

DLTJRNRCV  JRNRCV( MyLib/AMQA* )
MONMSG     MSGID( CPF2100 )             /* Skips unsaved rcvrs */
MONMSG     MSGID( CPF7000 ) EXEC( DO )  /* Specific errors...  */
ENDDO
MONMSG     MSGID( CPF9800 ) EXEC( DO )  /* General errors...   */
ENDDO
The MONMSG for CPF2100 will simply ignore the generic group of *ESCAPE messages for CPF21hh where ‘hh’ is any pair of hex digits. The likely message will be CPF2117 that comes because one or more receivers will be attached or otherwise not yet saved.
.
The MONMSG CPF7000 is for a generic set of CPF70hh *ESCAPE messages that might happen for journal error conditions. You can put code into the DO-group that sends messages or does whatever you think should be done in the situation. If you put nothing in the DO-group, the errors will effectively be ignored as if you never coded the EXEC() parameter at all. If you don’t code the MONMSG, the *ESCAPE message will cause any program-level MONMSG to be activated or will throw an error for the job.
.
The MONMSG CPF9800 will catch general object CPF98hh *ESCAPE messages that aren’t specific to journals. This works the same as the one for CPF7000.
.
In general, that code should simply delete all saved receivers and ignore others.
.
Tom


View Discussion   |  April 30, 2013  12:34 AM
AS/400, AS/400 journaling, CL Program
discussed by:
TomLiotta
108,300 pts.

How to auto-advance cursor to next input box (html within php)

I’d like door number 2 please – Cursor to jump to the next field after final character of current field is typed.
Probably doesn’t matter but I only want to do this for certain fields (so not ‘global’ via style sheet if that were an option).
TMI – a good example is the phone number which is split into multiple fields … very natural to be able to merely type all digits and they end up in the proper spots.



View Discussion   |  April 29, 2013  9:23 PM
HTML, PHP
discussed by:
aceofdelts
1,565 pts.

AS/400

What have you tried and specifically what problems are you having?
It will be easier if we know that so we can give you some tips.



View Discussion   |  April 29, 2013  9:04 PM
AS/400, AS/400 macros, iSeries
discussed by:
CharlieBrowne
32,915 pts.

How do I copy a data base file to IFS directory

Use CPYTOIMPF, CPYTOPCD, or CPYTOSTMF



View Discussion   |  April 29, 2013  7:28 PM
AS/400 - CL Command
discussed by:
CharlieBrowne
32,915 pts.

Defaults the Physical file with ‘%’ for Character fields and -9999 for Numeric fields.

Appreciate you take time to understand my prob. and Sorry for the confusion, Lets Me give a better try.

We have product for Insurance.

Suppose we create a policy and we want to change some data into it. e.g. Premium

Now we will create the file with data only in premium field, for rest of the fields we have to pass the default value for Numeric we have to pass ‘-9999′ and for character fields we have to pass ‘%’.
The problem is if we pass the blanks or Zeros in rest of the fields , it will get override. so we need to pass the default values so prevent the override.

Now the 2 ways which i m getting it.

1. Create the outfile of DSPFFD and read the file in my prog to identify the data type of fields and populate the fields with default value which should not be changed in product. and move the data in fields which needs to be updated.

2. Create a structure similar to that file and default the values in DDS.
Defined the file in program and move the data in the fields which we need to change and the rest of fields will be defaulted automatically.

I hope this time you don’t have any problem.



View Discussion   |  April 29, 2013  5:58 PM
AS/400, DB2, RPG, RPGILE
discussed by:
ddaswani
170 pts.

ASP Utilization

Submit a job with the command RTVDSKINF.
This should be done with by a USRPRF the has proper authority to objects.
When that job completes, use the PRTDSKINF.
Prompt on the command for the options of what you want to list. Options are self explanatory.



View Discussion   |  April 29, 2013  4:50 PM
AS/400, ASP Utilization
discussed by:
CharlieBrowne
32,915 pts.

Android app game hacking

My question is where did the app come from? Did it come from a valid source? Is it new to the market? Any negative user feedback on the app? How do you know your information was compromised and if so what info did the get? If you are downloading apps most are tied to your e-mail/ Gmail or Google account for update notifications. Maybe that’s where the info came from.



View Discussion   |  April 29, 2013  4:22 PM
Android, Hacking, Mobile
discussed by:
ToddN2000
3,915 pts.

Defaults the Physical file with ‘%’ for Character fields and -9999 for Numeric fields.

The request seems confusing. Are you to read a file, then set default values for all missing fields? If so, you could have an issue if the file is defined with unique keys and one of them is to be updated with your default value. Do we know the file layout to determine the field types and length to set the defaults properly ?
If this is to be used for multiple files, I am assuming this because you state you are passing the file as a parameter. Not all files have the same format/layout so creating this as a generic program make little sense.

Show us what you have tried.



View Discussion   |  April 29, 2013  4:15 PM
AS/400, DB2, RPG, RPGILE
discussed by:
ToddN2000
3,915 pts.

discussed by:
philpl1jb
44,190 pts.

AS/400

Sounds fairly simple except for “display a record from a file in a loop condition”.
Do you want to show all records or just the first or a selected RRN in the file? Is there a DSPF associated? How are they to be displayed as a sub file or other method? If you are going to display record as a message, what type?

Show us what you have tried and we can give you some help.



View Discussion   |  April 29, 2013  4:02 PM
AS/400, AS/400 commands, CL Program
discussed by:
ToddN2000
3,915 pts.

What is the best program to record times a video has been played?

Is this information to track your viewing or is it viewing from a network or the web?
IF web viewing you may be able to use Google Analytics, I have not tried it but have seen some of the data available it can provide by our webmaster.

Other than that I am not sure of anything that captures the action of file usage.
You might be able to do something in VB or C# with on-click events and log to a table or cookie. Still new to VB myself so not 100% sure on that.



View Discussion   |  April 29, 2013  3:53 PM
iTunes, Video hosting, Windows Media Player
discussed by:
ToddN2000
3,915 pts.

Receipt of .JPEG files

Are you sure the image file format is .JPEG ? What program are you trying to view the image with? Have you tried to view with another program and get same results?

If you still have files you cannot view because it may be a partial file check to see if there are limits on e-mail size like Tom mentioned. Our work e-mail has a size limit that includes the attachments. I am not sure in HOTMAIL or YAHOO have size limits, but you could have the sender try and send to another account and see if problem still exists. Maybe sender went over their allotted data limits and the problem is at their end.



View Discussion   |  April 29, 2013  3:44 PM
JPEG, JPEG files
discussed by:
ToddN2000
3,915 pts.

CPF5011 COBOL subfile error

To paraphrase Scarlett O’Hara, Today IS another day…to arm wrestle my subfile…
I have partially solved my problem getting rid of the CPF5011 error.

In wanting to reset the error condition (reverse image) I was rewriting the subfile record with the indicator turned off whenever the negative amount error was NOT found.

I deleted that bit of code with the following resulting scenario –

Entered negative amount on subfile record #3.
Reverse image and expected error message display (without additional CPF5011!).

Then, corrected subfile record #3 to valid positive amount and entered negative amount on subfile record #5.
Reverse image remained on corrected subfile record #3 and reverse image on subfile record #5 with expected error message.

So I still need to reset my reverse image indicator when correction is made to a subfile record that was previously in error. But how to do that without rewriting the subfile record every time a record is read…

I’m off to try and reset reverse image indicator and rewrite only for subfile record that was in error previously…



View Discussion   |  April 29, 2013  2:54 PM
AS/400, AS/400 Subfiles, COBOL
discussed by:
LetItBe
185 pts.

Object is currently in use

I do have the error log like this

An operation attempted to use object ‘XYZ ‘This object is currently in use.
Recovery :Allow time for the current operation to complete and then retry. If no operation is being performed, determine
if the object is checked out. If it is, use the Check In Object (CHKIN) command to check in the object and then retry. To determine what is currently using the object or if the object is checked out, you can use the
Retrieve Object References (QP0LROR) API, or examine the object’s propert
using System i Navigator. Additionally, the Work with Object Links (WRKLNk) or Display Object Links (DSPLNK) commands can be used to determine if the object is checked out.

QP0LROR :retrives object reference, For specific IFS objects access or lock information is retrieved. –what are the steps we need to follow to fetch the object which is using.



View Discussion   |  April 29, 2013  2:52 PM
AS/400, AS/400 jobs
discussed by:
ravula
450 pts.

Creating an out of office message when you’re a delegate

In order to set ‘out of office’ for your boss you need full mailbox rights of your boss & you have to open her mailbox as a primary mailbox via outlook.

-Ketan



View Discussion   |  April 29, 2013  2:31 PM
Microsoft Outlook 2007, Microsoft Outlook features
discussed by:
Ketan19
95 pts.

CPF5011 COBOL subfile error

What do you mean when you say “I start reading the subfile at relative record number 1…”? That is, please show the COBOL READ statement that you use.
MOVE 1 TO RELATIVE-NUMBER
PERFORM 30000-EDIT
THRU 39999-EXIT
UNTIL RELATIVE-NUMBER > SUBFILE-CNT
OR ERRORS-EXIST.
———————————————————————-
30000-EDIT.
IF NO-ERRORS
READ SUBFILE XXX9999-FILE INTO SFL9999-I
FORMAT ‘SFL9999′.

IF NO-ERRORS
IF SHOULDB OF SFL9999-I < 0
MOVE 'Y' TO ERROR-SW
MOVE TURN-ON TO IN40
MOVE CORR SFL9999-I TO SFL9999-O
REWRITE SUBFILE XXX9999-RECORD FROM SFL9999-O
FORMAT 'SFL9999'
MOVE 'MSG1111' TO MSGID
PERFORM XXXXX-MSG
ELSE
MOVE TURN-OFF TO IN40
MOVE CORR SFL9999-I TO SFL9999-O
REWRITE SUBFILE XXX9999-RECORD FROM SFL9999-O
FORMAT 'SFL9999'
END-IF
END-IF.

ADD 1 TO RELATIVE-NUMBER.
Also, please show the statement that puts the subfile error indicator back out to a subfile record.

.
What does the SELECT statement look like for the subfile?
SELECT XXX9999-FILE
ASSIGN TO WORKSTATION-XXX9999
ORGANIZATION IS TRANSACTION
ACCESS IS DYNAMIC
RELATIVE KEY IS RELATIVE-NUM
CONTROL-AREA IS SCREEN-CONTR
FILE STATUS STATUS-CODES.



View Discussion   |  April 29, 2013  1:19 PM
AS/400, AS/400 Subfiles, COBOL
discussed by:
LetItBe
185 pts.

Why do you think there’s a renewed interest in UC&C?

I do believe mobility is a big driver as many in IT and management are realizing that (un)unified communications and collaboration are just too unwieldy, complex, frustrating, and unproductive. These same challenges are abound in information security – there are so many systems and very few are talking to one another and operating in a truly effective manner. If you look under the hood, this creates duplication of efforts and many other inefficiencies to the point where nothing is done well.

Technology creates a lot of headaches but we need to be smart enough to figure out how technology can benefit the other side of the equation.



View Discussion   |  April 29, 2013  1:18 PM
BYOD, Collaboration, Unified Communications
discussed by:
KevinBeaver
10,860 pts.