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
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
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
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
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.
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.
Use CPYTOIMPF, CPYTOPCD, or CPYTOSTMF
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.
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.
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.
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.
Perhaps this will help
http://search400.techtarget.com/tip/Display-all-the-jobs-that-have-a-lock-on-an-IFS-object
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.
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.
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.
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…
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.
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
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.
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.







