Re: Weird problem a customer is having with a file (James H H Lampert)

"Mark S. Waterbury" <[email protected]>
Newsgroups gmane.comp.lang.as400.mi
Message-ID <012f01c667cc$d6ff9060$0400000a@dadspc>
 Here is one example:

    RUNQRY QRY(X/X) QRYFILE((Y/Y)) OUTTYPE(*OUTFILE) +
                      OUTFILE(A/B C *RPLMBR)   

Or you can specify this in the *QRYDFN itself, e.g.: under "Select output type and output form":

                          Define Database File Output                           
                                                                                
 Type choices, press Enter.                                                     
   (The printed definition shows the output file record layout.)                
                                                                                
   File . . . . . . . . .   CHMOUTP        Name, F4 for list                    
     Library  . . . . . .     CHMDEMO      Name, F4 for list                    
   Member . . . . . . . .   *FILE          Name, *FIRST, *FILE, F4 for list     
                                                                                
   Data in file . . . . .   1              1=New file, 2=Replace file           
                                           3=New member, 4=Replace member       
                                           5=Add to member                      
                                                                                
   For a new file:                                                              
     Authority  . . . . .   *USE           *LIBCRTAUT, authorization list name, 
                                           *CHANGE, *ALL, *EXCLUDE, *USE        
                                                                                
                                                                                
     Text . . . . . . . .   ChangeMaster Delete Older Versions output file      
   Print definition . . .   N              Y=Yes, N=No                          
                                                                                
 F3=Exit          F4=Prompt        F5=Report          F10=Process/previous      
 F12=Cancel       F13=Layout       F18=Files                                    
                                                                                
Notice options 4 and 5 for "Data in file" above...

Hope that helps?

----- Original Message ----- 
> From: "James H H Lampert" <[email protected]>
> To: "MI Programming on the AS400 / iSeries" <mi400-Zwy7GipZuJhWk0Htik3J/[email protected]>
> Sent: Monday, April 24, 2006 2:08 PM
> Subject: Re: [MI400] Weird problem a customer is having with a file (James H H Lampert)
>

> "Mark S. Waterbury" <[email protected]> wrote:
> . . .
>> use CPYF from the renamed original file to the new 
>>file, with ERRLVL(*NOMAX) to ignore any errors.
> . . .
> 
> The plot thickens:
> 
> I simply tried doing a CPYF of the entire "problem" file 
> (it's not very big) to a new one, freshly compiled from 
> DDS, with ostensibly the same structure, with *NOCHK and 
> ERRLVL(*NOMAX).
> 
> CPYF refused to copy the "problem" record.
> 
> So we've got a file that (with sufficient doctoring) 
> QuestView can read, but which CPYF can't.
> 
> Just to be sure, I tried it not only on the V4R2 box that 
> has succeeded our late, lamented V2R3 box as the seat of 
> QuestView development, but also on the V5R2 test box that 
> I used to initially restore the customer's save file.
> 
> This just keeps getting weirder.
> 
> Mark: If I understand your suggestions correctly, you said 
> something about having Query pour its result directly into 
> a file that's been properly compiled from DDS. I'm not 
> exactly a Query/400 expert (I'm much more familiar with 
> OPNQRYF and SQL). Could you explain that, in words of two 
> syllables or less?
> 
> --
> JHHL
> _______________________________________________
> This is the MI Programming on the AS400 / iSeries (MI400) mailing list
> To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/mi400
> or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/mi400.
>
_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.