HEX timestamp in AS/400 QHST

I wrote the following page against the QHST History Log files
on the AS/400. When I don't have a WHERE clause the extraction of
the timestamp ends up in the 1870s but the calculation in
ColdFusion seems right. When I limit the records selected as below
both seem to give dates that match each other to the second but are
off by up to half a minute from looking at the output of the DSPLOG
program . Is there a better way to do the Hex conversions and get
high numeric precision?
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/qwccvtdt.htm
http://publib.boulder.ibm.com/tividd/td/TWS/SC32-1266-00/en_US/HTML/Eqqn1mst175.htm
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.ise ries.orxw.doc/orxw_ref369.htm
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad min/r0000835.htm

Had to do a dummy select to preset the variable types to stop
the bad extraction of the timestamps in the 1870s. The microseconds
have to be added separately if that much precision is
desired.

Similar Messages

  • FMS 3.5 says 'Bad network data': error in handling RTMP extended timestamps / chunkSize?

    Hello all,
    For a client, I am working on a project where a live RTMP stream is published to an Adobe FMS 3.5.6 server from a java application, using Red5 0.9.1 RTMPClient code.
    This works fine, until the timestamp becomes higher than 0xFFFFFF after 4.6 hours, and the RTMP extended timestamp field starts being used. I have already found: when the extended timestamp was written after the header, the last 4 bytes of the data were being cut off. I have fixed this locally, and now the data being sent seems to me to be conformant to the spec. However, FMS still throws an error message in the core log and then kills the connection from the Red5 client. Here is the error message:
    This is the error message:
    2011-06-03     14:28:02     13060     (e)2611029     Bad network data; terminating connection : chunkstream error:message length 11893407 is longerthan max rtmp packet length     -
    2011-06-03     14:28:02     13060     (e)2631029     Bad network data; terminating connection : (Adaptor: _defaultRoot_, VHost: _defaultVHost_, IP: 127.0.0.1, App: live/_definst_, Protocol: rtmp, Client: 5290168480216205379, Handle: 2147942405) : 05 FF FF FF 00 13 = 09 01 00 00 00 01 00 01 01 ' 01 00 00 00 00 00 13 4 09 0 00 00 01 ! 9A & L 0F FA F6 12 , B4 A6 CE H 8A AB DC G BB d k 1B 9F ) 13 13 D2 9A E5 t 8 B8 8D 94 ! 8A AE F6 AF } " U 0 D3 Q EF FF ~ 8D 97 D9 FF BE A3 F3 C9 97 o 9D # F9 7F h A4 F7 } / FB & F1 DC 9C BF   BD D3 E7 CA 97 FE E2 B9 E4 F7 9E 1A F6 BA } C9 w FC _ / / w FE n EF D7 P 9C F4 BE 82 8E F7 | BE 97 B4 BB D7 FE ED I / FB D1 93 9A F9 X \ 85 BD DD I E3 4 E8 M 13 D3 " ) BE A9 92 E5 83 D4 B4 12 DE D5 A3 E6 F4 k DE BF Q 3 A0 g r A4 f D9 BD w * } F7 r 8A S 2 . AB BD EE ^ l f AF E1 0B $ AF 9D D7 - BF E8 ! D3 } D3 i E3 B8 F2 M A8 " B1 A5 EF s ] A5 BC 96 E5 u e X q D2 F1 r F9 i 92 b EE Z d F9 * A6 BB FD 17 w 4 DD 3 o u EB ] ] EF FE B5 B1 0A F2 A0 DD FD B2 98 DF E8 e F6 CB FD 96 V % A5 D5 k ] FD w EF AF k v AA E8 ! 9F / w BE FA 9A _ E F2 D3 , ? 17 } AD 7 EC B3   } 07 B5 | z { { A5 = 11 90 CF BF ; 4 FE EF 95 F7 E7 DF B9 , AF z 91 CF C9 BD DE CB { F5 17 } F2 E5 D7 DF z E6 [ 96 > Y m 9F EB AF DD D8 E8 v B9 A8 E9 % A7 | 1 CF 8B D Z k N DF F8 N FA S R FE . ~ CB A 9 E1 ) 8F 8E BB EC c 6 13 F1 AC FD FD FC 8A F7 F3 K B9 FA ^ / A4 FC B9 AA F6 DE C2 [ 1A E c r B3 BF E5 EC B5 x 94 FD . A9 t I Q % EA EC DE | K FE z A4 97 F9 " 1 0F CA FB F5 F5 p 9E 99 3 - ; B8 F4 F1 FF t A3 EC BC # DE AC 91 13 19 o < 06 F5 FD 7F 7 _ $ D B t B5 0D 8A C1 C1 BA 0B FE DB B7 83 _ } BD z F7 CB { FC M A9 8D = D5 B1 < 85 = EF E1 ; BA H y FC BC B4 C A2 D9 ` e E4 94 H 5 13 ' 93 93 8E E C2 1C R 97 9 X B7 FF 10 9F { ) F1 CF AB AC ] EE H A2 DE D3 C5 m F6 K A2 A7 A2 89 D2 z EB DF 97 ^ k 9E 99 BB E7 B6 97 w { ~ + C7 B2 } FE ' C4 | B6 o H DD r A8 9F DC FF F9 Q b l 93 T B6 EE FF 11 j CD s P C F1 3 R I F8 D8 R 9D 93 AA D5 + DE FC BE " B9 E1 ` CB BD 0F F5 C7 AA w CF 8D p 9A F7 g f N FF 84 B7 K Q 93 g E1 - D3 s } w v AE 96 98 ED CF BA E9 2 . f 99 95 97 o 13 CA F7 s e $ F4 B5 15 C4 A8 DE M F7 w \ 8D 00 C6 C2 b D3 / 7 w F2 ' BF CD 89 FF > D7 FB BC A2 S N FB A5 CD AF D3 F9 9D DF AE B5 17 CF 9D B7 , B9 9 ^ 7F [ 93 84 F7 } _ EA DF u \ 99 Z t E CA M EF 7 " AD FE 92 9E n 7F EB D8 C { 99 8B 9E w H BF B1 | g 9F F3 FA E1 - E5 CB BB x CF p 8B D2 w v EF w FA E2 F7 s C5 AC $ FC B4 DB BE G E4 DC F0 A0 96 F3 ! t DC FF % A5 CB A4 ^ AB D2 BD E7 9A E ' 08 + AF U 17 EB 8A w A7 N E4 A5 x 93 12 _ - ; 09 DD DF m 11 BE w \ } BA D3 t BC D9 97 9B C5 7F D8 H F1 D 7 8A ^ FA n F0 B8 W E6 84 5 - 8 B5 h o C4 F7 83 P 88 CB AE m t BB L 95 A9 s 90 A2 Y o DF K _ / l D2 D1 C9 91 ' E4 BD / / D 97 m BB E7 14 93 % C5 ; DD CF D8 : ~ B5 4 F FA U F0 8F w w DC FD 83 FC 13 EF w p DA A5 07 _ * - 1D 14 9D D5 84 F E6 F0 FF E4 15 w n A5 9F DE d AE F5 " - f D2 AE 96 1F # FA F1 x C1 L DF l M 06 8A E4 z DB 17 BA l DA e 15 CD 85 86 1F 09 82 h ] C6 { E7 C5 AF Z C5 B0 83 v D9 03 FC / ~      -
    The message for which the hex dump is displayed, is a video message of size 4925 bytes. Below is the basic logging in my application:
    *** Event sent to RTMP connector: Video - ts: 16777473 length: 4925. Waiting time: -57937, event timestamp: 16777473
    14:28:02.045 [RtmpPublisher-workerThread] DEBUG o.r.s.s.consumer.ConnectionConsumer - Message timestamp: 16777473
    14:28:02.045 [RtmpPublisher-workerThread] DEBUG o.r.s.n.r.codec.RTMPProtocolEncoder - Channel id: 5
    14:28:02.045 [RtmpPublisher-workerThread] DEBUG o.r.s.n.r.codec.RTMPProtocolEncoder - Last ping time for connection: -1
    14:28:02.045 [RtmpPublisher-workerThread] DEBUG o.r.s.n.r.codec.RTMPProtocolEncoder - Client buffer duration: 0
    14:28:02.046 [RtmpPublisher-workerThread] DEBUG o.r.s.n.r.codec.RTMPProtocolEncoder - Packet timestamp: 16777473; tardiness: -30892; now: 1307104082045; message clock time: 1307104051152, dropLiveFuturefalse
    14:28:02.046 [RtmpPublisher-workerThread] DEBUG o.r.s.n.r.codec.RTMPProtocolEncoder - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!12b Wrote expanded timestamp field
    14:28:02.046 [NioProcessor-22] DEBUG o.r.server.net.rtmp.BaseRTMPHandler - Message sent
    I have captured the entire frame containing this message with wireshark, and annotated it a bit. You can find it here:
    http://pastebin.com/iVtphPgU
    The video message of 4925 bytes (hex 00 13 3D) is cut up into chunks of 1024 bytes (chunkSize 1024 set by Red5 client and sent to FMS). Indeed, after the 12-byte header and the 4-byte extended timestamp, there are 1024 bytes before the 1-byte header for the next chunk (hex C5). The chunks after that also contain 1024 bytes after the chunk header. This appears correct to me (though please correct me if I'm wrong).
    When we look at the error message in the core log, the hex dump displayed also contains 1024 bytes, but it starts from the beginning of the message header. The last 16 bytes of the message chunk itself are not shown.
    My question is this: is the hex dump in the error message always capped to 1024 bytes, or did FMS really read too little data?
    Something that may be of help, is the reported 'too long' message length 11893407. This corresponds to hex B5 7A 9F, which can also be found in the packet, namely at row 0c60 (I've annotated it as [b5 7a 9f]. This location is exactly 16 bytes after the start of the 4th chunk data, not really a place to look for timestamps.
    My assumptions during this bug hunting session were the following (would be nice if someone could validate these for me):
    - message length, as specified in the RTMP 12 and 8-bit headers, defines the total number of data bytes for the message, NOT including the header of the first message chunk, its extended timestamp field, or the 1-byte headers for subsequent chunks. The behaviour is the same whether or not the message has an extended timestamp.
    - chunk size, as set by the chunkSize message, defines the total number of data bytes for the chunk, not incuding the header or extended timestamp field. The behaviour is the same whether or not the message has an extended timestamp.
    I believe I've chased this problem as far as I can without having access to the FMS 3.5 code, or at least being able to crank up the debug logging to the per-message level. I realize it's a pretty detailed issue and a long shot, but being able to publish a stream continuously 24/7 is critical for the project.
    I would be very grateful if someone could have a look at this hex dump to see if the message itself is correct, and if so, to have a look at how FMS3.5.6 handles this.
    Don't hesitate to ask me for more info if it can help.
    Thanks in advance
    Davy Herben
    Solidity

    Hello,
    It took a bit longer than expected, but I have managed to create a minimal test application that will reproduce the error condition on all machines I've tested on. The application will simply read an H264 file and publish it to an FMS as a live stream. To hit the error condition faster, without having to wait 4.6 hours, the application will add a fixed offset to all timestamps before sending it to the FMS.
    I have created two files:
    http://www.solidity.be/publishtest.jar : Runnable java archive with all libraries built in
    http://www.solidity.be/publishtest.zip : Zip file containing sources and libraries
    You can run the jar as follows:
    java -jar publishtest.jar <inputFile> <server> <port> <application> <stream> <timestampOffset>
    - inputFile: path to an H264 input video file
    - server: hostname or IP of FMS server to publish to
    - port: port number to publish to (1935)
    - application: application to publish to (live)
    - stream: stream to publish to (output)
    - timestampOffset: nr of milliseconds to add to the timestamp of each event, in hexadecimal format. Putting FFFFFF here will cause the server to reject the connection immediately, while FFFF00 or FFF000 will allow the publishing to run for awhile before the FMS kills it
    Example of a complete command line:
    java -jar publishtest.jar /home/myuser/Desktop/movie.mp4 localhost 1935 live output FFF000
    Good luck with the bug hunting. Let me know if there is anything I can help you with.
    Kind regards,
    Davy Herben

  • Re-Occurring Blue Screen~Dump files included~Please Help~Unable to verify timestamp for ntkrnlpa.exe

    Hello,
    Starting yesterday I started getting the BSOD. I have uploaded my dump files to this dropbox account:
    www.dropbox.com/sh/w3ryago8pfcw2y2/AAAR5i6Crx5q-p--xdESJjnMa
    There are lots of them as my PC crashed many times.
    I attempted to analyze them with windbg but all I can see is:
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    Also I ran sfc /scannow and it found no integrity violations.
    After the first BSOD I was barely able to get Windows to load without another immediate crash. I couldn't boot my PC last night but today seems okay so far. CPU temp was fine, actually quite cool as I had my window open right by the PC with the side off
    the case and it was cold last night. Today, so far, seems to be running okay...so far anyways..
    Windows update recently installed a driver for my on-board video card (Nvidia GeForce 6150n) on the 18th I think as I started using a 2nd monitor using the on-board card in addition to my PCI Express Ati Radeon HD. To use the second screen, I switched
    the primary video in CMOS to on-board instead of PCI-E 16x so the on-board Nvidia card would be enabled.
    I also installed brand new ram (4gb DDR2) about a month ago
    and a new power supply 2 months ago. The power supply is not "exactly" the same voltage as the one that was in there but it's dang close. But I don't have any power leeching components.
    Other than that nothing new has happened. After I got the crash, I tried to enter CMOS yesterday and it glitched out on me twice. I hope it's not my motherboard..
    I am willing to do a system re-format as I am running Windows 7 32bit on a 64bit AMD so I wouldn't mind having 64 bit Windows anyways but I'd like to know what the problem is before I do this. Thank you.
    Update: Just did a MalwareByte's Anti-Malware scan and no malware but found these items: 
    Scan Date: 5/22/2014
    Scan Time: 6:08:00 PM
    Logfile: 
    OS: Windows 7 Service Pack 1
    CPU: x86
    File System: NTFS
    Scan Type: Threat Scan
    Result: Completed
    Objects Scanned: 261539
    Time Elapsed: 8 min, 10 sec
    Processes: 0
    (No malicious items detected)
    Modules: 0
    (No malicious items detected)
    Registry Keys: 0
    (No malicious items detected)
    Registry Values: 0
    (No malicious items detected)
    Registry Data: 0
    (No malicious items detected)
    Folders: 2
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode, , [dd97c58f413a74c2503e7106649ec23e], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0, , [dd97c58f413a74c2503e7106649ec23e], 
    Files: 9
    PUP.Optional.OptimumInstaller.A, C:\Users\Justin\Downloads\Player-Chrome.exe, , [6b090a4a4437d363a05f361717ea718f], 
    PUP.Optional.Outbrowse, C:\Users\Justin\Downloads\install-flashplayer.exe, , [561ee173fe7d1125edf4d9a443be5aa6], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0\icon-128.png, , [dd97c58f413a74c2503e7106649ec23e], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0\icon-16.png, , [dd97c58f413a74c2503e7106649ec23e], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0\icon-48.png, , [dd97c58f413a74c2503e7106649ec23e], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0\jquery-1.10.2.min.js, , [dd97c58f413a74c2503e7106649ec23e], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0\manifest.json, , [dd97c58f413a74c2503e7106649ec23e], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0\tweetwiki.js, , [dd97c58f413a74c2503e7106649ec23e], 
    PUP.Optional.CrossRider.A, C:\Users\Justin\AppData\Local\Google\Chrome\User Data\Default\Extensions\ecoccdldklbjglocbgbfpmpehjegkode\0.1_0\_DS_Store, , [dd97c58f413a74c2503e7106649ec23e], 
    Physical Sectors: 0
    (No malicious items detected)

    Hi,
    All of the attached DMP files are of the
    WHEA_UNCORRECTABLE_ERROR (124) bug check.
    A fatal hardware error has occurred. This fatal error displays data from the Windows Hardware Error Architecture (WHEA).
    If we run an !errrec on the 2nd parameter of the bug check (address of the WER structure) we get the following:
    BugCheck 124, {0, 867d2024, b2000010, 10c0f}
    ===============================================================================
    Section 2 : x86/x64 MCA
    Descriptor @ 867d2134
    Section @ 867d22bc
    Offset : 664
    Length : 264
    Flags : 0x00000000
    Severity : Fatal
    Error : BUSLG_OBS_ERR_*_NOTIMEOUT_ERR (Proc 0 Bank 4)
    Status : 0xb200001000010c0f
    This is a pretty complicated error compared to other possibilities it could have been, as it implies you have a hardware fault somewhere along the bus (not very definitive on its own).
    In our case however, we can go a bit deeper with this one:
    0: kd> .formats 0xb200001000010c0f
    Evaluate expression:
    Hex: b2000010`00010c0f
    Decimal: -5620492266238833649
    Octal: 1310000001000000206017
    Binary: 10110010 00000000 00000000 00010000 00000000 00000001 00001100 00001111
    Chars: ........
    Time: ***** Invalid FILETIME
    Float: low 9.61613e-041 high -7.45059e-009
    Double: -7.41853e-068
    Now that we have this info, we'd refer to the AMD manual:
    63 VAL Valid
    62 OVER Status Register Overflow
    61 UC Uncorrected Error
    60 EN Error Condition Enabled
    59 MISCV Miscellaneous-Error Register Valid
    58 ADDRV Error-Address Register Valid
    57 PCC Processor-Context Corrupt
    56–32 Other Information
    31–16 Model-Specific Error Code
    15–0 MCA Error Code
    In our specific case, bit 63 of the status code is set, so it is valid. Bit 62 of the status code is
    unset, therefore there's no overflow. Bit 61 implies an uncorrected error has occurred, and Bit 60 implies an error condition was enabled. Last but not least, Bit 57 is
    set and implies a corrupted processor context.
    If we take a look at the last 15 bits of the binary:
    Binary: [trimming] 00001100 00001111
    In our case, the MSB in binary (00001100 ), implies a bus error occurred (as I mentioned above). We need to further decode the bits to understand more:
    [0000]1100 00001111
    0000 = 1PPT RRRR IILL.
    PP = Participation Processor, T = Timeout,
    R = Memory Transaction Type, I = Memory and/or I/O, and finally
    L = Cache Level.
    With this said, it appears we actually have a faulty motherboard as the processor seems fine, etc. The only other thing I see possible is bad RAM, which you can figure out whether or not is the case by running no less than ~8 passes of Memtest:
    Memtest86+:
    Download Memtest86+ here:
    http://www.memtest.org/
    Which should I download?
    You can either download the pre-compiled ISO that you would burn to a CD and then boot from the CD, or you can download the auto-installer for the USB key. What this will do is format your USB drive, make it a bootable device, and then install the necessary
    files. Both do the same job, it's just up to you which you choose, or which you have available (whether it's CD or USB).
    Do note that some older generation motherboards do not support USB-based booting, therefore your only option is CD (or Floppy if you really wanted to).
    How Memtest works:
    Memtest86 writes a series of test patterns to most memory addresses, reads back the data written, and compares it for errors.
    The default pass does 9 different tests, varying in access patterns and test data. A tenth test, bit fade, is selectable from the menu. It writes all memory with zeroes, then sleeps for 90 minutes before checking to see if bits have changed (perhaps because
    of refresh problems). This is repeated with all ones for a total time of 3 hours per pass.
    Many chipsets can report RAM speeds and timings via SPD (Serial Presence Detect) or EPP (Enhanced Performance Profiles), and some even support changing the expected memory speed. If the expected memory speed is overclocked, Memtest86 can test that memory performance
    is error-free with these faster settings.
    Some hardware is able to report the "PAT status" (PAT: enabled or PAT: disabled). This is a reference to Intel Performance acceleration technology; there may be BIOS settings which affect this aspect of memory timing.
    This information, if available to the program, can be displayed via a menu option.
    Any other questions, they can most likely be answered by reading this great guide here:
    http://forum.canardpc.com/threads/28864-FAQ-please-read-before-posting
    Regards,
    Patrick
    “Be kind whenever possible. It is always possible.” - Dalai Lama

  • SIP 400 Bad Request

    I'm getting a bad request error when attempting to an outbound SIP call on a IP2IP gateway (H323 -> SIP).
    It's a slightly odd configuration as we will only be using this route for outgoing calls only. The only error message I get is:
    //-1/xxxxxxxxxxxx/SIP/Error/sipsdp_add_standard_lines: media_src_address is NULL; c-line is not added
    SIP Invite message:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.1:5060;branch=z9hG4bK11222C
    From: "anonymous" <sip:[email protected]>;tag=404CF30-282
    To: <sip:[email protected]>
    Date: Wed, 16 May 2007 13:09:44 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer
    Min-SE: 1800
    Cisco-Guid: 15103203-2971783453-520093696-2887190163
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Remote-Party-ID: <sip:[email protected]>;party=calling;screen=yes;privacy=full
    Timestamp: 1179320984
    Contact: <sip:[email protected]:5060>
    Call-Info: <sip:192.168.1.1:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
    Expires: 180
    Allow-Events: telephone-event
    May 16 13:09:44.608 UTC: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpSocketReads: Msg enqueued for SPI with IP addr: 192.168.1.2:5060
    May 16 13:09:44.608 UTC: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWNewConnMsg: context=0x00000000
    May 16 13:09:44.608 UTC: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Received:SIP/2.0 400 Bad Request
    Via: SIP/2.0/UDP 192.168.1.1:5060;branch=z9hG4bK11222C
    From: "anonymous" <sip:[email protected]>;tag=404CF30-282
    To: <sip:[email protected]>
    Call-ID: [email protected]
    CSeq: 101 INVITE
    User-Agent: 2N StarGate V-02.20.47
    Allow: INVITE, BYE, ACK, CANCEL, OPTIONS
    Content-Length: 0
    Any ideas?

    For what its worth, I had the same problem from Callmanager to an IOS IPIPGW. I was getting the SIP/2.0 400 Bad Request - 'Malformed/Missing Contact field' error message. Turns out I had mistyped my caller id mask and was sending characters in place of numbers. By correcting it, my problem went away.
    Todd

  • CRS Editor - Retrieving Timestamp database field from SQL 2005

    Hello -
    For the life of me, I cannot retrieve a database timestamp field from SQL 2005.
    I have successfully used 'cast(Date as char(30)) as DateStr' to convert to string but the DBRead statement displays the original object only as java.lang.Timestamp.  Any posts regarding this topic usually require Java skill sets above my level (creating new java class for import,...).
    There has to be an easy way to do this without being a Java programmer, yes?
    Any help here would greatly be appreciated!
    Thanks
    Andy Backus
    941.587.7199

    Andy,
    I'm guessing you know that this isn't really a date/time value in MS SQL.  According to Microsoft: 
    The Transact-SQL timestamp data type is not the same as the timestamp data type defined in the SQL-92 standard. The SQL-92 timestamp data type is equivalent to the Transact-SQL datetime data type.
    But to your question how to get the timestamp value out in a string...You'll want to use the convert function:
    select convert(varchar(10),myTimestampField) from myTable
    That will return the hex value in the column in a string format.  Also, when you retrieve the data, are you looking at the original table (which specifies the column is a timestamp), or did you create a dummy table with the columns named and formatted the way the data will be returned that UCCX can look at for the schema?  If it doesn't have the correct schema to look at, you'll have problems.
    Cliff
    please rate helpful posts

  • Workflow manager 1.0 : runtime error 400 running Add-WFHost "The api-version in the query string is not supported"

    Installing Workflow Manager 1.0 for SharePoint Server 2013 SP1 everything is fine until the last step of the configuration and last powershell command : 
    Add-WFHost -WFFarmDBConnectionString 'myconnectionstring' -RunAsPassword $WFRunAsPassword -EnableFirewallRules $true -SBClientConfiguration $SBClientConfiguration -CertificateAutoGenerationKey $WFCertAutoGenerationKey -Verbose;
    gives me the following error : 
    Add-WFHost : The remote server returned an error: (400) Bad Request. The api-version in the query string is not supported. Either remove it from the Uri or use one of '2012-03'..TrackingId:412684e3-3539-468e-91e6-17838c6eaa55_GS
    P,TimeStamp:04/04/2014 12:54:11
    At line:1 char:1
    Can't find anything about this subject except this
    thread which does not help me that much in SharePoint dev env ...
    Removing workflow manager 1.0 and service bus (leave the farm using wizzard, remove binaries and databases) does not help.
    Who already faces this issue and how can I try to resolve it ?
    Best regards !
    Alexandre DAVID

    The API version is hardcoded in Microsoft.ServiceBus.dll, which ships as part of the Service Bus. Each version of this lib has a different string.
    If you install workflow manager 1.0, here are the pre-requisites:
    .NET Framework 4 Platform Update 3 or .NET Framework 4.5
    Service Bus 1.0
    Workflow Client 1.0
    PowerShell 3.0
    The following are the pre-requisites to configure Workflow Manager 1.0
    Instance of SQL Server 2008 R2 SP1, SQL Server Express 2008 R2 SP1, or SQL Server 2012.
    TCP/IP connections or named pipes must be configured in SQL Server.
    Windows Firewall must be enabled. [Windows Firewall is Off on target server]
    Ports 12290 and 12291 must be available.
    Here are the reference for installing and configuring Workflow Manager 1.0:
    http://lennytech.wordpress.com/2013/06/02/installing-workflow-manager-1-0/
    http://lennytech.wordpress.com/2013/06/02/configuring-workflow-manager-1-0/
    http://social.technet.microsoft.com/Forums/en-US/c74507fb-ac2d-405f-b19c-2712b1055708/workflow-manager-10-configuration-service-bus-for-windows-server-the-api-version-is-not?forum=sharepointadmin

  • Test published web service experiment error with Status Code 400

    I have created an experiment in Azure ML Studio free version that works perfectly in Azure ML Studio when running. After the web service publication I am presented with the following error when I call a test for my web service.
    5: Error 0085: The following error occurred during script evaluation, please view the output log for more information: ---------- Start of error
    message from Python interpreter ---------- data:text/plain,Caught exception while executing function: Traceback (most recent call last): File "\server\InvokePy.py", line 98, in executeScript outframe = mod.azureml_main(*inframes) File "\temp\azuremod.py",
    line 55, in azureml_main File "C:\pyhome\lib\site-packages\pandas\core\indexing.py", line 119, in setitem self._setitem_with_indexer(indexer,
    value) File "C:\pyhome\lib\site-packages\pandas\core\indexing.py", line 438, in _setitem_with_indexer raise ValueError('Must have equal len keys and value ' ValueError: Must have equal len keys and value when setting with an iterable ---------- End
    of error message from Python interpreter ----------, Error code: ModuleExecutionError, Http status code: 400, Request id: 2c22cced-a109-4e12-856e-455a90644e68, Timestamp: Thu, 23 Apr 2015 10:28:12 GMT
    The input data for the test are:
    userID = "U5000"
    restaurant = "resA"
    rating=1
    These data are exactly the saame data that my experiment takes as input in Azure ML Studio running mode. My experiment is consisted of 2 python scripts and one meta data editor. The first python script reads the input data, calculates and feeds them into
    the metadata editor and the metadata editor feeds the result into the second python script. The second python script module code is very simply and just pivots the data fed:
    import pandas as pd
    def azureml_main(dataframe1):
       newtable = pd.pivot_table(dataframe1, index="restaurant", columns='userID', values="rating")
       return newtable,
    I cannot understand what is the error and why it is not raised during the running proccess but it is rised during the testing web service proccess. I should note here that when I use only one python script module the above error is not raised in the web
    service call.  Waiting for your response
    Thank you very much.

     Related to
    https://social.msdn.microsoft.com/Forums/azure/en-US/ff40b046-a7bb-4718-bedc-4260ef95d8d7/test-web-service-published-returns-error-code-internalerror-http-status-code-500?forum=MachineLearning
    Thanks for the feedback. This is a known issue. We are working on it. Sorry for the inconvenience.
    Luis Cabrera. Program Manager -- Azure Machine Learning @luisito_cabrera Disclaimer: This post is provided &amp;quot;AS IS&amp;quot; with no warranties, and confer no rights.

  • TDMS with timestamp and configurable channels

    I am trying to figure out a good way to determine how to line up data in a TDMS file with corresponding timestamps when the user in my application adds channels.
    Here's the scenario,
    Lets say I've been recording 10 channels (called Ch0,Ch1...Ch9) in a group called 'Data'. My data appears as follows in the TDMS file:
    (10 Ch's, 3 Samples) 
    Timestamp
    Ch0
    Ch1
    Ch2
    Ch3
    Ch4
    Ch5
    Ch6
    Ch7
    Ch8
    Ch9
    12:00:01 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:02 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:03 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    Let's say now the user decides to add an additional channel to the group. The TDMS write function will add the channel, but the new data does not line up with the corresponding timestamp, instead it start writing to the first row as follows:
    (11 Ch's, 6 samples, 3 new channel samples)
    Timestamp
    Ch0
    Ch1
    Ch2
    Ch3
    Ch4
    Ch5
    Ch6
    Ch7
    Ch8
    Ch9
    Ch10
    12:00:01 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100
    12:00:02 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100
    12:00:03 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100
    12:00:04 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:05 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:06 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    I would want it to appear as follows:
    Timestamp
    Ch0
    Ch1
    Ch2
    Ch3
    Ch4
    Ch5
    Ch6
    Ch7
    Ch8
    Ch9
    Ch10
    12:00:01 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:02 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:03 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:04 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100
    12:00:05 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100
    12:00:06 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100
    Other than just starting a brand new TDMS file, can anyone think of a way to line the data up with its corresponding timestamp in this scenario? Or if there is a way to determine what the corresponding timestamp is when I read in the TDMS file.
    Any help is appreciated
    Thanks,
    -CAC

    From your description that the channel values have their corresponding timestamp, I assume that you are writing the waveform data rather than those basic data type(integer, double, etc.) which do not have any timestamp related information.
    The reason that the new data in Ch10 does not line up with the same timestamp data in other channels is because:
    When writing data to a channel, it cannot leave the first several positions vacant, and start writing from the nthe position.
    From the view of TDMS as a file format, it should only be responsible for data logging, and not assume any relationship between channels.
    In your case, the new data in Ch10 channel should have the timestamp starting from 12:00:04 AM to 12:00:06 AM, these data are definitely stored from the first position of Ch10, and .tdms file format cannot do anything to line up the data between channels.
    Timestamp
    Ch0
    Ch1
    Ch2
    Ch3
    Ch4
    Ch5
    Ch6
    Ch7
    Ch8
    Ch9
    Ch10
    12:00:01 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100 (12:00:04 AM)
    12:00:02 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100 (12:00:05 AM)
    12:00:03 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    1100 (12:00:06 AM)
    12:00:04 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:05 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    12:00:06 AM
    100
    200
    300
    400
    500
    600
    700
    800
    900
    1000
    For your second question, there is a approach to determine the corresponding timestamp of each channel data read out from .tdms file. The waveform data type is stored in .tdms file in the form of three components:
    Value array value[ ]
    Starting time stamp t0, which is the base timestamp of a channel (or the timestamp of the first value in this channel)
    Time increment dt, the time interval between two data samples. (e.g. one sample per second, dt=1.0; four samples per second, then dt=0.25)
    So it's very easy to calculate the Timestamp of value[index] = t0 + (dt * index)  (0 <= index < num of samples in value[])
    Here is a VI in the attachment that demonstrates how to get the timestamp of each value in the channel.
    Regards,
    Tianbin
    Attachments:
    GetDataTimestamp.vi ‏21 KB

  • Convert data from AS/400

    When I make a query to AS/400 table, the character field appear in Hexa presentation, How can I translate that to human readable format?
    Thanks

    You can retrieve data from your database, and then perform some convertions between datacodifications.
    You can cast an int to a char to a String:
    int vInt = 50;
    char vChar = (char)vInt;
    String vString = ""+vChar;
    System.out.println("int=" + vInt + ", char=" + vChar + ", str=" + vString);
    // output: int=50, char=2, str=2
    All think that your stoed data are in the form of strings like "0x56" for hex 56, Integer.decode() are useful here.

  • Low level Hex disk edit & search util needed- suggestions please?

    low level Hex disk edit & search util needed- suggestions please?
    Maybe It's just late & I've had a bad day.... but I haven't needed a low level Hex disk edit & search utility suitable for an Intel 10.4.x Mac until now and can't seem to locate one.
    There should be plenty of free/shareware options (because they're handy and not particularly hard to write ... and every tech head needs one some time)...
    Any suggestions please?
    [I haven't bothered with the commercial stuff - like tech tool/Norton/*insert name here* Recover/repair, Something Genius etc. etc. because they are all without exception either unnecessary (just pretty shells for the underlying UNIX/X utils) useless AND greedy $-gougers, just useless, or just money gougers so I couldn't even say whether any still have a 'feature' like the old Norton Disk editor app had - but a quick look about suggest not...]
    grumble
    Any specific suggestions/links, please?
    TIA

    they are all without exception either unnecessary (just pretty shells for the underlying UNIX/X utils) useless AND greedy $-gougers, just
    useless, or just money gougers
    Such a high-esteem for fellow human beings - and
    programmers...
    You know, there are some good decent nice people
    behind those names?
    You'd be amazed at how much testing goes into a product.
    [SNIP]
    g'day Hatter...
    Yes, I know there are some good decent nice people behind those names..fellow human beings - and fellow programmers (so yes, I do know...) In previous incarnations I have 'thunk up' and developed, Marketed & supported considerably more complex Apps & systems myself - I even know some of the people you mention personally - and they are usually decent Blokes/women but normally, it isn't the programmers who make the decisions on pricing/features/support/performance/upgrade costs & cycles etc...
    My only error was, I agree, the phrase 'without exception' - but (mainly) only because I haven't bought/tested & used all of them very very recently. So I offer my apologies to those to whom my remarks should not apply (long, late night/early morning frustration...)
    However, I also offer a few simple pertinent examples:
    One 'top name' Utility company had a 'save your Mac HD' product on the market for some time that was almost guaranteed to TRASH it irretrievably but did NOT say so - nor did they help or compensate those they harmed.
    Several are selling what amount to simple, pretty, GUI shells for 'free' or OS-included command line tools - no more, no less but do NOT say so and are asking good money for the 'software'.
    Many are asking ridiculous prices for "regular upgrades" so you can keep their tool current with your Mac OS - one wants US$100/year for it, another, $15 per u/g, others, US$25 or $40 per u/g; one asks 'only' $10 - and these 'upgrades' are happening 3,4,5,6 times per year and are necessary for the Marketing company to keep their product Saleable to new purchasers and new Macs (as well as for important Bug Fixes - and only co-incidentally to keep it performing with your current Mac and OS - which is what you paid them for in the first place).
    I won't pay for a product 3, 6 or 9 times and I won't advise my clients to: It's not unreasonable for a person to expect a 'sensible lifetime/currency' of Product X for Computer Y - say 3 years (e.g. AppleCare). I wouldn't object to paying for an "upgrade" at that point - IF it's worth the money.
    Software is Waaay too expensive in many cases and is simply inviting 'piracy' - from people who have already PAID for the product: sadly, they are killing their own Gooses.
    Seriously, one product costs ca. US$100 to Buy in the first place
    To keep it actually working for you costs about the same again Per Year - a 3 year 'sensible lifetime' or 'currency' cost of US$300 or $400! [That'll buy a lot of 'bare drives' to put in a handy Firewire case for automatic backups in Background, differential backups etc. and other simple practices which render this product type largely unnecessary ].
    For what? A relatively simple set of utilities which would actually cost the company involved less than $5 total each - over 3 years - to make available to existing ( or 'current') owners. [Applecare 'complete' Hardware and Software warranty & support on a US$2000 iMac - which includes Tech Tools Pro Deluxe or somesuch costs about US$165 for 3 years. Total.]
    Having designed, developed, Marketed, supported & maintained more complex Applications to/for a sizeable user-base (in US terms) over multiple complete Series of Product 'life-cycles' - regular Updates and all, I think I know where the pirates are.
    These practices have been rampant in the MSWindows™ market for a longtime. It's a real shame to see it in the Mac world.
    I have all the esteem in the world for those fellow human beings who deserve such - and programmers who are 'good decent nice people'.
    I have none to spare for monopolists, 'exploitationists' or any of those who take unfair/unreasonable advantage of their fellow human beings - AND of programmers who are 'good decent nice people' (like, say, ME... .
    In any event, as I said: they are "killing their Gooses": I know of at least 6 software companies which went this route a while back. All are dead or dying.
    Thank you for your help - and the opportunity to apologise for 'mis-speaking'.
    all the best,
    orig g4 733, many others thru (the luvly) Macintels     New & old Macs, Wintels, MacIntels, other systems...

  • Multichannel multisample read timestamp for CCP

    I have been using multichannel multisample 2D Dbl CAN read vi to acquire data from my CCP functions. This is almost the same as what is shown in the NI CCP toolset examples. However, now I want to read the timestamps, but when I select the multichan- multisamp- 2D Time & Dbl, I get the error:
    HEX: BFF62209
    Read/Write not matched initialized input/output mode.
    The CCP init task does not have a mode selection as for CAN Init Start, and so I have no idea how to solve this problem. Any ideas please?
    Thanks.

    Hello Elmo
    I've had a look at the functions, and the way to specify mode is via the 'Message Configuration' input on the CCP initialise function. If you look at the help file for this function it shows the breakdown of the cluster input. Its the fourth item in the cluster is the mode configuration. The numerics map to the following settings:
    0 - Input 1 - Output 2 - Timestamped Input 4 - Output Recent.
    Setting up the initialise with the mode set, should pass the correct CAN task reference to allow you to perform the timestamped measurement.
    Hope this helps, if you have any further questions, feel free to ask.
    Regards
    Hannah
    NI

  • TDMS Timestamp Decoding - Help!!

    I am in need of help with decoding the timestamp in TDMS files.  Specifically in the properties section.  The following (very vague documentation) provides limited details:
    http://zone.ni.com/devzone/cda/tut/p/id/5696
    Specifically looking for bit definition of the "tdstimestamp" type.  As an example I extract the following hex values from a TDMS file:
    44 00 00 00 EA D8 C5 AC 4F 9E 56 BC C2 2F F3 C3 00 00 00 00
    I know that the first four bytes (44 00 00 00) signify the timestamp datatype, but how do I decode the remaining bytes.    The approximate time of above is 11:55:41AM on March 4, 2008.
    Thanks for any help!

    Matt - Thanks, that works great!!
    Dave,  I see that the MATLAB pluggin was just updated to include MATLAB 2008b.  We take data in our labratory using the TDMS format.  When we distribute this to other researchers, they often use MATLAB (and of course Labview). 
    For about a year now, the Matlab pluggin has been out of date and would not work with the last 3 releases of MATLAB.  Since it is a compiled C library, we're stuck and can not modify it.  As the internal TDMS format is not changing and only low level matlab commands are required to read it, I believe that Matlab users have been looking for a simple Matlab function to just take a tdms file and make a similar .mat file (not a dll).  This is what I have done (and thanks to Matt for the timestamp help).
    The Excel TDMS add-in is very nice and is a good reason to use the TDMS format (in addition to its good support in VI libraries), but I often have to fend off requests to write large ASCII or flat binary files (in addition to our TDMS files) so that they can be read in MATLAB.  I don't want to have the burden of making/distributing a LV executable that makes this interim file format and then creates a .mat file.   

  • Hex colors not the same

    I'm trying to change the background color of an xspf music player from black ( as in Roddy's tutorial ). I chose the Safe Hex colors, and wanted to try out a few to judge what they looked like.
    However: whatever code I write in, I ONLY get black or various shades of blue.
    Any ideas ?
    Thanks, Kay.

    Hallo Star-Fish, thanks for answering. This is the URL:
    http://www.innerspheresmusic.com/Audio_4.html
    I just checked on a Windows PC and the page is blank- not even a blue rectangle. In iWeb, it looks exactly the same as this page viewed on a mac; ie. the player hasn't properly established itself either.
    I'll post my HTML code here too- perhaps you can spot the faults:
    <object type=”application/x-shockwave-flash” width=”400” height=”170” quality=”high” bgcolor=”#FFFFFF”
    data=”http://www.innerspheresmusic.com/webmusic/xspf_player.swf?
    playlisturl=http://www.innerspheresmusic.com/webmusic/playlist.xspf&autoplay=1&volumelevel=50&timedisplay=1” />
    <param name=”movie”
    value=”http://www.innerspheresmusic.com/webmusic/xspf_player.swf?
    playlisturl=http://www.innerspheresmusic.com/webmusic/playlist.xspf&autoplay=1&volumelevel=50&timedisplay=1” />
    <param name=”bgcolor” value=”#FFFFFF” />
    </object>
    Kay.

  • Strip Hex Character

    I want to strip the character '0D15' from a String before inserting into a database.
    The character seems to get through this line of code:
    String strippedValue = unstrippedValue.replace('\n', ' ');
    I thought the hex value of 0D15 is a new line?

    No, unicode is not the same as hex; the same character can be many different things in "hex" depending on the character encoding used. Unicode is only one character encoding, but it is the default in Java.
    You should ask the AS/400 programmer how he gets a character from 0D15, obviously it's not by using unicode.
    What did you say about line breaks?

  • Timestamp/Date: the year isn't working

    I've searched and read online articles, the API, etc until my eyes were sore. If anyone can help, I'll be deeply indebted...
    I have a hex string: 00-06-40-D5-6B-D3-85-60.
    This hex translates into the long: 1760135241500000.
    I take this long and well, here's the code and it's output.
    l_unixTimestamp = [else where it's set to 1760135241500000];
    t_time = new Timestamp(l_unixTimestamp);
    System.out.println("Date: " + t_time.toString());
    Result:
    Date: 57746-06-19 11:58:20.0
    In truth, I don't know exactly what date this file should be outputing. However, I'm fairly certain that a year of "57746" is wrong. Does anyone have any suggestions?
    Thanks,
    Pablo

    Thanks, I'll look into it. My customer has told me the time is in microseconds but that the date is also from 2006 (or 2005, they don't remember exactly).
    Welp, if it's microseconds, that makes my time in 1970, July 23rd. So at least I know I'm on the right track... now where's my customer?

Maybe you are looking for

  • Questions on BPS BAPI calls and PDF forms

    I will need to create a button on a BPS form and that button is supposed to call a BAPI.  One of the buttons will create a PDF of the form (using the contents of the form) and print said form to a 'default' printer.  The issue is that not all cFolder

  • How to  sort page order in pdf file

    how do I rearrange  page order in pdf file

  • How do i stop the new file pop up when i start the program

    Everytime I start up Photoshop Cs6 either by opening a file or just the program in general i get a new window pop up each time, this is very annoying. I have tried resetting preferences but this method does not work and i have tried contacting adobe

  • Suggestions for archiving an iPhoto library? (and more questions)

    Ok, so here is my issue: Over 12,000 photos Over 65GB New camera that doubles the average file size of most previous pics to ~3MB I've thought about starting a new library and archiving the current one, but there is one thing I am scared of: having a

  • Alias names for account dimension

    Hi, The alias names for account dimension is not getting pushed to EAS for all EPMA essbase applications(ASO and BSO). However i see them in the application and in the dimension library. I just see the alias for accounts dimension as account but not