We define the metadata in SAS to access the above data as below...
Name Length Type Informat Begin POsition End Position
Column1 8 NUmeric s370fpd6. 1 6
Column2 20 Character $ebcdic20. 7 26
Null_If_1 1 Character $1. 27 27 Column3 8 NUmeric s370fpd6. 28 33
Null_If_2 1 Character $1. 34 34
Column4 5 Character $ebcdic5. 35 39
Null_If_3 1 Character $1. 40 40 Column5 14 Character $ebcdic14. 43 52
Null_If_4 1 Character $1. 53 53
We are able to pull the data from external file with the metadata defined as above except for the column3
I amn't sure if we define the metadata for the column3 preoperly...
And strangely we have to read the data for the column5 from the position 43 not from 41. If we read data from the position 41 a special character prefixed with these column values so we skipped the position 41 and reading data from the position 42 to avoid that special character
Could you please explain why should we read data from position 42 to skip that character, if you have expertise on this?
Thanks in advance, I can imagine you would have spent quite a long time to analyse the query I am posting here...
I don't believe that your DB2-unloaded DECIMAL specification matches the use of SAS INFORMAT s370fpd6.
Also, I am uncertain about your other concern, unless you can share a few data-row samples (pasted in a reply) and also some SAS processing log results are preferred for additional diagnosis and feedback.
We need to see your DATA step program completely with the INPUT statement(s) at a minimum, as well as your INFILE statement too. Plz explain for us where you are processing this data with SAS and if the processing is not natively happening on z/OS, tell us exactly how you get the data to the OS platform where it is processed.
Read the post below for guidelines with handling code, special characters, when constructing your SAS discussion forums post.
If you permit some type of NULL-VALUE field in your input data which is not correctly formatted for the specified SAS INFORMAT, you will need to code ?? prior to naming the INFORMAT. Have a look at the DOC for details on its purpose.
I am unfamiliar with answering your DI-specific question about how/where to introduce the "??" parameter for "file reader" - possibly. Are you getting a SAS ERROR or a NOTE/WARNING message when you run your program with INFORMAT s370fpd6. specified?
Check the SAS Language Elements discussion on the INPUT statement and using INFORMATs - particularly, the topic on INVALID DATA. The only relief it provides is to mask the condition in the SAS log, suppressing the warning message. Consider though (I believe) you still end up with the desired result, a SAS numeric variable with a missing value condition.
Possibly there may be information here (or you may need to contact SAS tech support for guidance) - or just ignore the SAS log warning messages about INVALID DATA or INVALID ARGUMENT TO FUNCTION: