I have a job which copies contents from input file & writes into output file, but the contents in input file are of different datatypes(CHARACTER,BINARY)........
input file :
col 1 to col 4 character
col 5 to col 9 binary
output file should be like
col 1 to col 4 character( as it is in input file)
col 5 to col 9 as zoned decimal or charater
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can't just make up your own syntax and expect it to work. You have to use the syntax actually defined by DFSORT.
You say "col 5 to col 9 binary" which would be 5 bytes, but then you use 4 bytes for the BI field, so I'll assume it's actually 4 bytes. If so, you can use these DFSORT control statements:
However, keep in mind that the maximum 4-byte BI value is 4294967295 which will NOT fit in a 4-byte ZD field, so LENGTH=10 would make more sense unless your maximum BI value happens to be only 9999.