As we know, WeChat image's name complys the format like mmexport<timestamp>, and <timestamp> means unix timestamp in the way of 13 bits(ms).
But QQ image's name contains some hex digits, so what's the format of name about QQ saved pictures? Such as -20297a14ba64a506.jpg, how to understand this name?
Related
So I get the date and time which is, for example, 17.11.2021 and 12:44. Now I want to convert this date and time into the formate which Freemarker is using (yyyy-MM-dd hh:dd:mm:ss). However the problem here is that I can't convert it properly. I tried like:
${myDateTime?datetime.iso?string("yyyy-MM-dd HH:mm:ss")}
But this wont work. I always get an error message. Can anyone explain or show me the correct formation in this case ?
Assuming myDateTime is a String (and not already a Date object), and it looks like 17.11.2021 12:44, you can convert it to ISO format like this:
${myDateTime?datetime("dd.MM.yyyy HH:mm")?string.iso}
Above myDateTime?datetime("dd.MM.yyyy HH:mm") converts the string to a Date (which is a format-independent representation), and then ?string.iso formats the Date with ISO format.
Note that it would be much cleaner if myDateTime was a Date, not a String. Then you just do this: ${myDateTime?string.iso}
I have created layout based on cobol copybook.
Layout snap-shot:
I tried to load data also selecting same layout, it gives me wrong result for some columns. I try using all binary numeric type.
CLASS-ORDER-EDGE
DIV-NO-EDG
OFFICE-NO-EDG
REG-AREA-NO-EDG
CITY-NO-EDG
COUNTY-NO-EDG
BILS-COUNT-EDG
REV-AMOUNT-EDG
USAGE-QTY-EDG
GAS-CCF-EDG
result snapshot
Input file can be find below attachment
enter link description here
or
https://drive.google.com/open?id=0B-whK3DXBRIGa0I0aE5SUHdMTDg
Expected output:
Related thread
Unpacking COMP-3 digit using Java
First Problem you have done an EBCDIC --> ascii conversion on the file !!!!
The EBCDIC --> ascii conversion will also try and convert binary fields as well as text.
For example:
Comp-3 value hex hex after Ascii conversion
400 x'400c' x'200c' x'40' is the ebcdic space character
it gets converted to the ascii
space character x'20'
You need to do binary transfer, keeping the file as ebcdic:
Check the file on the Mainframe if it has a RECFM=FB you can do a transfer
If the file is RECFM=VB make sure you transfer the RDW (Record Descriptor word) (or copy the VB file to a FB file on the mainframe).
Other points:
You will have to update RecordEditor/JRecord
The font will need to be ebcdic (cp037 for US ebcdic; for other lookup)
The FileStructure/FileOrganisation needs to change (Fixed length / VB)
Finally
BILS-Count-EDG is either 9 characters long or starts in column 85 (and is 8 bytes long).
You should include Xml in as text not copy a picture in.
In the RecordEditor if you Right click >>> Edit Record; it will show the fields as Value, Raw Text and Hex. That is useful for seeing what is going on
You do not seem to accept many answers; it is not relevant whether the answer solves your problem; it is whether the answer is correct answer for the question.
I have created an ach file which, in a text editor looks exactly like a valid ach file. When I open it in an ACH viewer tool I get an error saying that the first character must be 1. I found this in the NACHA file specs 'Picture: This is the type of bit the ACH system is expecting to see. A 9 indicates a numeric value and an X indicates an
alphabetic value. If you put a letter in a PIC 9 position, the system will reject the field. If you see a number in parentheses
after the X or 9, that indicates the number of characters in that field. For example 9(10) means that field contains 10
numeric characters.'
The first position in the file is supposed to have content 1 in Picture format of size 1. I don't understand what do I need to do to fix this?
I finally downloaded a Hex file explorer and saw that the valid ACH file and my file both had different first characters. I found out that the ACH file needs the data in the ASCII format. All I had to do was when I populated the ACH file with data, I converted the data to ASCII before writing it.
While you are working with files you can extract short name of a file by File.ShortName.
For example if the name is "Target.txt" then File.shortname will return "5A~.txt".
Is there any way to do this with other strings too? For example giving "Target" returns "5A~".
Possible?
There is a way to assign to a file, lets call it abc.txt, a progressive number, that I suppose should come from the time set?
So that the name of the file could become for example abc_5367879938763.txt
I have found the string set file=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
that gives a string of 8 characters, for example: 17360720