DBohner-(db)
Legendary Poster
I'm trying to use B34A1010 (Open Flat File) to create a file in a defined library (OUTBOUND) with a dynamic filename (from processing options). The Open Flat File is not creating the file in library OUTBOUND (or anywhere, as far as I can tell).
Here's my train of thought, examples and part of the log that shows the failure.
I concat 'OUTBOUND/' to the name provided in the processing options (in this case J55TC01) to get OUTBOUND/J55TC01. In this example - evt_szFilePath_EFRM is 'OUTBOUND/J55TC01'
0040 // Create Log File Member
0041 Open Flat File
"1" -> cSuppressErrorMessage
VA evt_cErrorCode_ERRC <- cErrorCode
VA evt_szErrorMessageId_DTAI <- szErrorMessageId
<Blank> -> cAppendMode
VA evt_idFilePtr_GENLNG <- idFilePtr
VA evt_szFilePath_EFRM -> szFilePath
In the following line - evt_UserLine_TXT0 is just some odd text.
0042 Write One Line To Flat File
"1" -> cSuppressErrorMessage
VA evt_cErrorCode_ERRC <- cErrorCode
VA evt_szErrorMessageId_DTAI <- szErrorMessageId
VA evt_idFilePtr_GENLNG -> idFilePtr
VA evt_UserLine_TXT0 -> szRecord
Then we close the file after a bunch more writes.
0046 Close Flat File
"1" -> cSuppressErrorMessage
VA evt_cErrorCode_ERRC <- cErrorCode
VA evt_szErrorMessageId_DTAI <- szErrorMessageId
VA evt_idFilePtr_GENLNG -> idFilePtr
0047 //
Here's the log from the iSeries - showing the failure (but, of course - I still don't know why).
Oct 20 09:18:58.061936 jdeobj.c1649 - **********************************************************************************
Oct 20 09:18:58.062040 jdeobj.c1652 - *** Start dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.062136 jdeobj.c1655 - **********************************************************************************
Oct 20 09:18:58.062240 jdeobj.c1745 - IN->[ 1] <Item>: cSuppressErrorMessage <type>: CHAR <Value>: [1]
Oct 20 09:18:58.062344 jdeobj.c1745 - IN->[ 2] <Item>: cErrorCode <type>: CHAR <Value>: []
Oct 20 09:18:58.062448 jdeobj.c1745 - IN->[ 3] <Item>: szErrorMessageId <type>: STRING <Value>: []
Oct 20 09:18:58.062552 jdeobj.c1745 - IN->[ 4] <Item>: cAppendMode <type>: CHAR <Value>: [ ]
Oct 20 09:18:58.062656 jdeobj.c1745 - IN->[ 5] <Item>: idFilePtr <type>: ID <Value>: [0]
Oct 20 09:18:58.062768 jdeobj.c1745 - IN->[ 6] <Item>: szFilePath <type>: STRING <Value>: [OUTBOUND/J55TC01]
Oct 20 09:18:58.062872 jdeobj.c1753 - **********************************************************************************
Oct 20 09:18:58.062968 jdeobj.c1756 - *** End dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.063072 jdeobj.c1759 - **********************************************************************************
Oct 20 09:18:58.063184 jdb_ctl.c5276 - Entering JDB_InitBhvr
Oct 20 09:18:58.063304 jdb_ctl.c5365 - Exiting JDB_InitBhvr with Success (UserHandle SPP:0000 :0000 :0:f:11)
Oct 20 09:18:58.063480 jdb_ctl.c5812 - Entering JDB_FreeBhvr (UserHandle SPP:0000 :0000 :0:f:11)
Oct 20 09:18:58.063592 jdb_ctl.c5847 - Exiting JDB_FreeBhvr with Success(UserHandle SPP:0000 :0000 :0:f:11)
Oct 20 09:18:58.063800 jdeobj.c1649 - **********************************************************************************
Oct 20 09:18:58.063904 jdeobj.c1652 - *** Start dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.064000 jdeobj.c1655 - **********************************************************************************
Oct 20 09:18:58.064104 jdeobj.c1745 - OUT->[ 1] <Item>: cSuppressErrorMessage <type>: CHAR <Value>: [1]
Oct 20 09:18:58.064208 jdeobj.c1745 - OUT->[ 2] <Item>: cErrorCode <type>: CHAR <Value>: [1]
Oct 20 09:18:58.064320 jdeobj.c1745 - OUT->[ 3] <Item>: szErrorMessageId <type>: STRING <Value>: [078D]
Oct 20 09:18:58.064424 jdeobj.c1745 - OUT->[ 4] <Item>: cAppendMode <type>: CHAR <Value>: [ ]
Oct 20 09:18:58.064528 jdeobj.c1745 - OUT->[ 5] <Item>: idFilePtr <type>: ID <Value>: [0]
Oct 20 09:18:58.064632 jdeobj.c1745 - OUT->[ 6] <Item>: szFilePath <type>: STRING <Value>: [OUTBOUND/J55TC01]
Oct 20 09:18:58.064736 jdeobj.c1753 - **********************************************************************************
Oct 20 09:18:58.064840 jdeobj.c1756 - *** End dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.064936 jdeobj.c1759 - **********************************************************************************
Oct 20 09:18:58.065048 jdeobj.c1497 - Return value is 2 for OpenFlatFile. (BSFNLevel = 2)
Oct 20 09:18:58.065144 jdeobj.c2201 - Entering AddObjectCache
Oct 20
=========================================
OK - what am I missing? I've checked permission for the library (*public has *all)
TIA
(db)
Here's my train of thought, examples and part of the log that shows the failure.
I concat 'OUTBOUND/' to the name provided in the processing options (in this case J55TC01) to get OUTBOUND/J55TC01. In this example - evt_szFilePath_EFRM is 'OUTBOUND/J55TC01'
0040 // Create Log File Member
0041 Open Flat File
"1" -> cSuppressErrorMessage
VA evt_cErrorCode_ERRC <- cErrorCode
VA evt_szErrorMessageId_DTAI <- szErrorMessageId
<Blank> -> cAppendMode
VA evt_idFilePtr_GENLNG <- idFilePtr
VA evt_szFilePath_EFRM -> szFilePath
In the following line - evt_UserLine_TXT0 is just some odd text.
0042 Write One Line To Flat File
"1" -> cSuppressErrorMessage
VA evt_cErrorCode_ERRC <- cErrorCode
VA evt_szErrorMessageId_DTAI <- szErrorMessageId
VA evt_idFilePtr_GENLNG -> idFilePtr
VA evt_UserLine_TXT0 -> szRecord
Then we close the file after a bunch more writes.
0046 Close Flat File
"1" -> cSuppressErrorMessage
VA evt_cErrorCode_ERRC <- cErrorCode
VA evt_szErrorMessageId_DTAI <- szErrorMessageId
VA evt_idFilePtr_GENLNG -> idFilePtr
0047 //
Here's the log from the iSeries - showing the failure (but, of course - I still don't know why).
Oct 20 09:18:58.061936 jdeobj.c1649 - **********************************************************************************
Oct 20 09:18:58.062040 jdeobj.c1652 - *** Start dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.062136 jdeobj.c1655 - **********************************************************************************
Oct 20 09:18:58.062240 jdeobj.c1745 - IN->[ 1] <Item>: cSuppressErrorMessage <type>: CHAR <Value>: [1]
Oct 20 09:18:58.062344 jdeobj.c1745 - IN->[ 2] <Item>: cErrorCode <type>: CHAR <Value>: []
Oct 20 09:18:58.062448 jdeobj.c1745 - IN->[ 3] <Item>: szErrorMessageId <type>: STRING <Value>: []
Oct 20 09:18:58.062552 jdeobj.c1745 - IN->[ 4] <Item>: cAppendMode <type>: CHAR <Value>: [ ]
Oct 20 09:18:58.062656 jdeobj.c1745 - IN->[ 5] <Item>: idFilePtr <type>: ID <Value>: [0]
Oct 20 09:18:58.062768 jdeobj.c1745 - IN->[ 6] <Item>: szFilePath <type>: STRING <Value>: [OUTBOUND/J55TC01]
Oct 20 09:18:58.062872 jdeobj.c1753 - **********************************************************************************
Oct 20 09:18:58.062968 jdeobj.c1756 - *** End dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.063072 jdeobj.c1759 - **********************************************************************************
Oct 20 09:18:58.063184 jdb_ctl.c5276 - Entering JDB_InitBhvr
Oct 20 09:18:58.063304 jdb_ctl.c5365 - Exiting JDB_InitBhvr with Success (UserHandle SPP:0000 :0000 :0:f:11)
Oct 20 09:18:58.063480 jdb_ctl.c5812 - Entering JDB_FreeBhvr (UserHandle SPP:0000 :0000 :0:f:11)
Oct 20 09:18:58.063592 jdb_ctl.c5847 - Exiting JDB_FreeBhvr with Success(UserHandle SPP:0000 :0000 :0:f:11)
Oct 20 09:18:58.063800 jdeobj.c1649 - **********************************************************************************
Oct 20 09:18:58.063904 jdeobj.c1652 - *** Start dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.064000 jdeobj.c1655 - **********************************************************************************
Oct 20 09:18:58.064104 jdeobj.c1745 - OUT->[ 1] <Item>: cSuppressErrorMessage <type>: CHAR <Value>: [1]
Oct 20 09:18:58.064208 jdeobj.c1745 - OUT->[ 2] <Item>: cErrorCode <type>: CHAR <Value>: [1]
Oct 20 09:18:58.064320 jdeobj.c1745 - OUT->[ 3] <Item>: szErrorMessageId <type>: STRING <Value>: [078D]
Oct 20 09:18:58.064424 jdeobj.c1745 - OUT->[ 4] <Item>: cAppendMode <type>: CHAR <Value>: [ ]
Oct 20 09:18:58.064528 jdeobj.c1745 - OUT->[ 5] <Item>: idFilePtr <type>: ID <Value>: [0]
Oct 20 09:18:58.064632 jdeobj.c1745 - OUT->[ 6] <Item>: szFilePath <type>: STRING <Value>: [OUTBOUND/J55TC01]
Oct 20 09:18:58.064736 jdeobj.c1753 - **********************************************************************************
Oct 20 09:18:58.064840 jdeobj.c1756 - *** End dumping data structure for business function OpenFlatFile
Oct 20 09:18:58.064936 jdeobj.c1759 - **********************************************************************************
Oct 20 09:18:58.065048 jdeobj.c1497 - Return value is 2 for OpenFlatFile. (BSFNLevel = 2)
Oct 20 09:18:58.065144 jdeobj.c2201 - Entering AddObjectCache
Oct 20
=========================================
OK - what am I missing? I've checked permission for the library (*public has *all)
TIA
(db)