× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Raja

Are you sure you are looking at the right things? Chuck said that the length of the OUTFILE is 290 - the length of the output file record for DSPFD will never be the length of your file's record.

I suggest that you do this command - RUNQRY () QTEMP/xxxxPF - this is similar to DSPPFM, except that it shows you the columns. Press F20 one time - you will find the column with the heading "Record Format Length" - it will NOT be 290, it should be 5777.

You do not want the file field description of the OUTFILE - the record format of the OUTFILE is NOT the record format of YOUR file, right?

You want to see one of the fields (RFLEN) in the OUTFILE, as I described above. You can go to STRSQL and run this - SELECT RFLEN FROM QTEMP/xxxxPF - you will also see your record length. That is the field you want to read in your program.

By the way, you can also get the record length if you use the *ATR type along with file attribute *PF - like this -

DSPFD FILE(xxxxDTA/xxxxPF) TYPE(*RCDFMT) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(QTEMP/xxxxPF)

I hope this is helpful
Vern

On 2/19/2012 4:20 AM, Raja Ayyer wrote:
Hi Chuck, Thank you for your detailed reply to my post re:DSPFD. I am sorry that the subject line said DSPFFD instead of DSPFD. My requirement was to get the record length of a file in order to pass that to a file transfer program as a parameter. I used DSPFD command in a CL program. The command used in order to get the record length of a particular database file that i was interested in is as below: DSPFD FILE(xxxxDTA/xxxxPF) TYPE(*RCDFMT) OUTPUT(*OUTFILE) OUTFILE(QTEMP/xxxxPF) The record length of xxxxDTA/xxxxPF is 5777 The record length I see in the OUTFILE is 290. This was my problem. In order to check the file field description of the OUTFILE, i used a DSPFFD command - DSPFFD QTEMP/xxxxPF. I assumed that I'd see the record length of QTEMP/xxxxPF (i.e the OUTFILE) to be the same (5777). Should I be looking for that somewhere else other than in the OUTFILE?
cheersRaja> To: midrange-l@xxxxxxxxxxxx
From: CRPbottle@xxxxxxxxx
Subject: Re: DSPFFD question.
Date: Sat, 18 Feb 2012 12:31:09 -0800

On 17-Feb-2012 01:24 , Raja Ayyer wrote:
Recently I had an issue with the DSPFD command - Reduced the
record length of a database file (having record length 5777)
with the *OUTFILE (into QTEMP) and *RCDFMT options to 290!!
The "Subject:" says DSPFFD, but the above quoted text notes DSPFD,
and presumably for an invocation specifying the TYPE(*RCDFMT) [Type of
information] used to obtain "Record Format" information about "a
database file" which is unnamed, but presumably one that is expected to
have a Record Length of 5777 bytes as recorded in RFLEN of RcdFmt
QWHFDFMT of the "System outfile for DSPFD TYPE(*RCDFMT)" named QAFDRFMT
in QSYS or QSYS29##].

So given the comment that the DSPFD TYPE(*RCDFMT) has "Reduced the
record length ... to 290", is the implication that instead of RFLEN=5777
for the output from DSPFD, the value of RFLEN=290?

Since the RcdLen for QWHFDFMT had\has long been 290, I suspect that
the issue described is a just mis-inference about the scenario; i.e. a
usage error.

Would appreciate if anybody can tell me whether this is normal
with the above options?
If not simply a misunderstanding of what was being viewed [e.g.
accidentally viewing DSPFFD of the named OUTFILE() in library QTEMP,
instead of looking at the value of RFLEN for the row data stored in the
output file], then perhaps a detailed description involving the scripted
requests and the effect\output of each step, rather than the attempt to
describe in /words/ would be more fruitful.?

I encountered this on the AS400 i-5series.
That the issue deals with AS/400, iSeries, i5/OS, or IBM i seems
intuitively obvious, not just for mention of what are presumabbly
uniquely named commands DSPFFD and DSPFD, but even solely based upon the
forum\mailing-list to which the message was posted. The OS level
[Version, Release, and Modification level], and perhaps the installed
language, would be much more pertinent in describing an issue.

Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.