|
Sorry Rob 50 things at once today. Here's RPGIV code: This in loop to get File Names C Eval Qcmd = 'CPYTOIMPF FROMFILE('+ C %trim(DRKY) + C ') TOSTMF(''qdls/forcastx/'+ C %trim(DRKY) + C '.txt'') MBROPT(*REPLACE) STMFC'+ C 'ODPAG(*PCASCII) RCDDLM(*CR) D'+ C 'TAFMT(*DLM) STRDLM(*NONE) FLD'+ C 'DLM(X''A1'')' * C CallP(E) Qcmdexc(Qcmd:%Len(%Trim(Qcmd))) * C If %Error C Eval Qcmd = 'SNDMSG MSG(''Import blew up on ' C %trim(DRKY) + ''')' + C ' TOUSR(' + User + ')' C CallP Qcmdexc(Qcmd:%Len(%Trim(Qcmd))) C Endif End file loop On iSeries WRKLNK command results Before Display Attributes Object . . . . . . : /qdls/forcastx/fxdtl.txt Last access date/time . . . . . . . . : 09/23/03 09:52:03 Data change date/time . . . . . . . . : 09/23/03 09:47:38 Attribute change date/time . . . . . . : 09/23/03 09:47:47 After CPYTOIMPF in STRDBG at about 10:45... **** Note: Data was changed in PF and copied to IFS with changes, what it should do. **** WRKOBJ on PF show 10:42 as Change date/time, what it should be. WRKLNK command results After Display Attributes Object . . . . . . : /qdls/forcastx/fxdtl.txt Last access date/time . . . . . . . . : 09/23/03 09:52:03 Data change date/time . . . . . . . . : 09/23/03 09:47:38 Attribute change date/time . . . . . . : 09/23/03 09:47:47 PC side of things after CPYTOIMPF If I look at file though a mapped drive to //qdls/forcastx/* ,right click on file, and look at it's properties it shows last modified and accessed times of 10:43:03, what it should be. But if I look at file though a mapped drive to //qdls/forcastx/* and set View of folder to Details, the Modified column of the list shows time of 9:47, the Before value?? Why are dates different and not set to current mod date/time??? Could by PC side being screwed ,cause it Windows, but iSeries side wrong also :O !! :( ?? :)... Thanks Bill Hopkins Comments,Questions,"Knocks in the Head" welcomed. rob@xxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/23/2003 11:12 AM Please respond to RPG programming on the AS400 / iSeries To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc: Subject: Re: CPYTOIMPF in RPGIV v5r1 Let me rephrase this to see if I understand what you are saying. You are doing the CPYTOIMPF to: To stream file . . . . . . . . . and not to: To data base file: File . . . . . . . . . . . . . Library . . . . . . . . . . Member . . . . . . . . . . . . You are doing the: Record format of import file . . *FIXED and not the default of: Record format of import file . . *DLM When you do the CPYTOIMPF the data is written to the IFS. All data is there, including all rows and all columns. And this data is currently what was in the physical file, and not what was in the original target IFS file. Repeat the data in the physical file has changed from the last run and this CPYTOIMPF reflects that change. Even though the data is changed the length of rows and/or columns did not change. Yet, all the data is there. The: Data change date/time . . Attribute change date/time are not updated when ran from within a RPG program, however they are when ran outside of the RPG program. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Bill Hopkins" <BHopkins@xxxxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/23/2003 09:10 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: CPYTOIMPF in RPGIV v5r1 I see the QCMDEXC for the CPYTOIMPF run. I have a callp(e) that looks for errors. It does not kick in after CPYTOIMPF. (IN Debug). Also what I see is that if the number of records doesn't change,record lenght doesn't change, or field size doesn't change from the last CPYTOIMPF. The WRKLINK comand or looking at file though map directory shows the modified date/time as what it was before the CPYTOIMPF. A value of a field may or may not have changed. When I compare the files the field values have changed just not the date/time modified. Am I going crazy??? Would not think it would work that way?? Could I be missing PTF at v5r1???? Thanks Bill Hopkins Comments, Questions, or "Knocks in the Head" welcomed. rob@xxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/23/2003 09:37 AM Please respond to RPG programming on the AS400 / iSeries To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc: Subject: Re: CPYTOIMPF in RPGIV v5r1 Couple of things: 1) Add a program status data structure. Check out the various fields that QCMDEXC will update in the PSDS. 2) Run this sucker in debug to make sure that the QCMDEXC actually executes. The one advantage that QCMDEXC has over system() is that you can get a little more detail in the PSDS, but if you're not going to use that... However QCAPCMD is a serious contender to both of them. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Bill Hopkins" <BHopkins@xxxxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/23/2003 08:03 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG400-L@xxxxxxxxxxxx cc Subject CPYTOIMPF in RPGIV v5r1 I have a RPGIV program v5r1 that uses CPYTOIMPF by pr extpgm(QCMDEXC) it seems to sometimes not replace the file that is there (based on date/time stamp seen though Windows Explorer). Authority is public *all on files (in PF,in IFS on iSeries and in Operation Nav). Any one have this happen before? Note when this happens I can manually run command on iSeries and it will work. Thanks Bill Hopkins Comments, Questions, or "Knocks in the Head" welcomed. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.