Get answers.  Share knowledge.  Collaborate with peers.




Read backword in CL/400

Or use the command Read Record using CLF (READRCDCLF), which supports reading the previous record with TYPE(*PRV). The command documentation can be found here.

CLF provides a no-charge run-time which includes support for READRCDCLF.

Vendor response:
Your productivity can be improved by using the optional CLF precompiler, which does have a charge.
End of vendor response

Bruce Vining



View Discussion   |  April 5, 2012  11:11 PM
CL, CL/400, Physical File
discussed by:
bvining
6,055 pts.

Socket() “too many files open” error – but no files are open

…when I call the “C” socket() function, I am receiving…

How do you know that’s what you’re receiving? That is, please show the code that determines that an error exists and that the errno is 3452.

Also, what happens before Socket() that might set errno?

Tom



View Discussion   |  April 5, 2012  11:07 PM
AS/400, AS400. RPG
discussed by:
tomliotta
107,995 pts.

RPGLE program described files

Why is this so diffcult to space so it is readable?

Because it is rendered with HTML.

First, you’re not controlling the font. Simply pasting text without font specification allows the browsers to choose defaults. Second, HTML compresses consecutive whitespaces. If you don’t don’t put formatting codes into the HTML, it will provide default formatting. Third, if you copy/paste without including carriage-return/line-feed characters, you’ll get run-on results from one line to the next. (5250 green-screens don’t have ant CR/LF characters to copy, so none get pasted.)

The editor provides a {code} button. If you surround code with {code} tags supplied by the button, you’ll have better results. The “How to use…” link tells you about this so you don’t have to ask.

This is my error: *RNF7260 30 3 The Factor 2 operand is not valid for the specified operation.

The error apparently says that you have three source lines where you have something in the Factor 2 portion of the instruction that can’t be used there. CharlieBrowne possibly covers two of those.

I’d also question the EXCEPT FILE02 lines. I can’t quite determine what this line is trying to specify:

OFILE02     E                ADD

It’s not clear if “ADD” is intended to be an exception-name or a record-addition code. Either way, there is no exception-name of FILE02; that’s a file-name. (Maybe that works and just isn’t documented.)

Regardless, either 2 or 4 lines seem indicated as possible errors, yet the RNF7260 seems to be telling us “3″.

Without seeing readable code, and possibly more of the code, I don’t know what more can be said.

Tom



View Discussion   |  April 5, 2012  10:52 PM
iSeries RPGLE, RPGLE Program
discussed by:
tomliotta
107,995 pts.

Commitment Control in RPGLE Program

Like all HLLs, RPG provides a COMMIT operation for commits and ROLBK for rollback.

Whether or not the commitment definition is appropriate for a particular commit or rollback is a different question.

Tom



View Discussion   |  April 5, 2012  10:06 PM
AS400 RPGLE, RPGLE
discussed by:
tomliotta
107,995 pts.

How to find the fullpath/absolute path of a file at AS400?

If it actually is in a “library” rather than a true directory, then you need to specify the path in the IFS format. BigKat provided an example that shows a full path down to a member level. His example demonstrates the path for a file that exists in the /QSYS.LIB file system which is where all “libraries” exist.

Different types of files might not have members.

Tom



View Discussion   |  April 5, 2012  10:01 PM
AS/400, as/400 files
discussed by:
tomliotta
107,995 pts.

SQL Update not Working using two files

Situation here is very similar to Dab77 and I was on tract with Mariodlg post.
I want to update a filed in file A with content from file B. File A has more records thatn file B. The statement here still returns a “Null values not allowed . . . ”

Can anyone shed some light for me, the green horn of sql?

UPDATE VINITMB A
SET (a.IFOTH) = (SELECT coalesce (B.IGCOST,0)
FROM ITEMVND1 B
WHERE A.IFITEM = B.IGITEM AND A.ifloc = B.IGLOC AND A.IFDIV = ’116′)
WHERE EXISTS
(SELECT 1 FROM ITEMVND1 B where b.IgITEM = a.IfITEM AND b.igloc = A.IFLOC)

UPDATE VINITMB A
SET IFOTH = (SELECT coalesce (B.IGCOST,0)
FROM ITEMVND1 B WHERE A.IFITEM = B.IGITEM AND A.IFLOC = 1
AND A.IFDIV = ’116′)
WHERE EXISTS
(SELECT 1 FROM ITEMVND1 B where B.IGITEM = A.IFITEM AND B.IGLOC = A.IFLOC)



View Discussion   |  April 5, 2012  9:55 PM
AS/400, AS/400 SQL, SQL, SQL Server, SQL Server Updates
discussed by:
rsnc
30 pts.

Commitment Control in RPGLE Program

Commitment control looks a little different for native I/O vs SQL, which are you using?
Phil



View Discussion   |  April 5, 2012  7:19 PM
AS400 RPGLE, RPGLE
discussed by:
philpl1jb
44,150 pts.

Is there a GodMode for Windows XP?

Hey Denny, what if the Control Panel is blocked? Thats what most people use “GodMode” for anyways.



View Discussion   |  April 5, 2012  5:44 PM
Microsoft .NET, Windows, XML
discussed by:
random3213213231
10 pts.

Time Difference/duration in Lotus Notes 8 form

That won’t work; he wants to add the 2 values, not find the difference between them



View Discussion   |  April 5, 2012  4:08 PM
Lotus Forms, Lotus Notes 8, Lotus Notes Fields
discussed by:
stiletto
2,700 pts.

Can we rename QSECOFR user id.(Auditors requirement)

You can add another lever of security to QSECOFR by this system value:
System value . . . . . : QLMTSECOFR
Description . . . . . : Limit security officer device access

I agree with Tom, you need new auditors – someone who better understands the iSeries.



View Discussion   |  April 5, 2012  3:43 PM
AS/400, OS/400
discussed by:
woodengineer
5,525 pts.

AS400 report issue

indicators can also effect processing. So changing a value of an indicator might do more than control double spacing.



View Discussion   |  April 5, 2012  12:03 PM
AS/400 reporting, AS/400 Reports, RPG36
discussed by:
philpl1jb
44,150 pts.

Read backword in CL/400

OPNQRYF there is a parameter Keyfield order, give *DESCEND in that.
2. First find the total number of records from RTVMBRD and Move that to field RRN. Then OVRDBF filename Pointer = &RRN. RCVF Rcdfmtname. Then RRN = RRN -1 again OVRDBF
3. Use an LF with descending Key and use this LF in the program.



View Discussion   |  April 5, 2012  10:40 AM
CL, CL/400, Physical File
discussed by:
ramvishakramesh
1,900 pts.

Time Difference/duration in Lotus Notes 8 form

Set the 3rd field to computed and do a…
Fld2-Fld1
formula

alternatively:
If you are using lotusScript you can use either of these:

Returns the difference in seconds as a double

difference = notesdatetimeobj.TimeDifferenceDouble(othernotesdatetimeobj)

Returns the difference in seconds as a long

difference = notesdatetimeobj.TimeDifference(othernotesdatetimeobj)

Hope that helps.



View Discussion   |  April 5, 2012  9:25 AM
Lotus Forms, Lotus Notes 8, Lotus Notes Fields
discussed by:
chrisdm
65 pts.

Can i install Linux by double along with win 7

Yes you can. Searching the internet will surely point you in the right direction, more specific instructions can even be found if you know which Linux you want to install.

For example:
http://www.howtogeek.com/howto/9059/dual-boot-your-pre-installed-windows-7-computer-with-ubuntu/



View Discussion   |  April 5, 2012  8:08 AM
Linux installation, Windows 7
discussed by:
chrisdm
65 pts.

What is QSSP/PRTBAR and how do I call it?

I referred to the cobol manuals and changed the code to use an externally defined printfile.

For everything in the foreseeable future, that’s by far the best direction. Post back if you have problems.

Tom



View Discussion   |  April 5, 2012  6:09 AM
AS/400 v6.1, iSeries v6.1
discussed by:
tomliotta
107,995 pts.

DDL

i want to create an index for a view so the the the individual record can be assessed faster.

You can create an index with no concern about any view.

It doesn’t have to be “for a view”. SQL will use the index the same way. It wouldn’t be any faster if it was “for a view”.

Tom



View Discussion   |  April 5, 2012  4:45 AM
Data Definition Language, DDL, DDL Index
discussed by:
tomliotta
107,995 pts.

Windows 7 Pro PCs are not pinging to 2003 DC

Physical checking is necessary as my opinion like nic, lan cable etc etc…. as u mentioned only one has this kind of probs ! Is it possible to test with a cross cable that happens only two pcs connecting a wire with this cable’s both ends and then ping each of them with their IP. I am not sure but u can do a try.



View Discussion   |  April 5, 2012  4:08 AM
2003 DC, Windows 7 Client
discussed by:
rechil
22,035 pts.

AS400 File transfer from AS400

I transfered the database output into excel file using CPYTOIMP command…

The CPYTOIMPF command cannot create Excel files. It can create .CSV files that can be imported into Excel; and then Excel can put its output into an Excel file.

But SNDDST cannot send Excel files through e-mail unless you have properly encoded them first. If you are really sending Excel files, what did you use for the encoding?

Tom



View Discussion   |  April 5, 2012  1:02 AM
AS/400 File Transfer, CPYTOIMPF, SNDDST
discussed by:
tomliotta
107,995 pts.

What is QSSP/PRTBAR and how do I call it?

PRBAR is called with four parameters. It’s called multiple times to pass different key pieces of information like height, position, data, etc. The bar code prints on the open document of the callling program.
Parameters:
1. printfile name 10a
2 key word such as “position” 10a
3 information pertaining to keyword 10a or 80a I forget
4. 2 position code. blanks 2a

I can call it from a command line with the 4 parameters and get the same error msg.

I resolved the issue. The program did have an internally described printfile like qsysprt. I referred to the cobol manuals and changed the code to use an externally defined printfile. Once you told me it was s/36, I understood and I decided to get away from that type of programming.
Thanks again for your response.



View Discussion   |  April 4, 2012  11:56 PM
AS/400 v6.1, iSeries v6.1
discussed by:
modiyooch
540 pts.

Deleting the physical files without deleting logical files

You can not delete a PF while there is a LF over it. You can delete the object FL code then delete the PF. The LF can be recomplied later.



View Discussion   |  April 4, 2012  7:53 PM
AS400 file changes, Logical Files, MIMIX on iSeries, Physical Files, V5R3
discussed by:
rrbond07
135 pts.