Here is an only moderately contrived example of @Kurt_Bremser and why a single variable may have multiple INFORMATS in actual use.
data example;
input repsource $ @;
if repsource='Source1' then input date :date9.;
else if repsource='Source2' then input date :yymmdd10.;
else if repsource='Source3' then input date :julian.;
format date date9. ;
datalines;
Source1 22AUG2024
Source2 2024/08/22:00:00:00.000000
Source3 24235
;
You may think this is completely made up. This is actually a simplified example of just one data source I dealt with. The "data" file to read was a text file that had been made by appending years of report files with similar but slightly different header outputs as time went on. So I had the joy of PARSING multiple report formats to apply standard rules. You may have a luxury of never dealing with such but the first input with the trailing @ holds the input on that line of the file. That way you can examine some of the contents to determine 1) is this the header record I need) 2) which header record type is it and then 3) read other values which will have different read requirements.
So, from that code, which informat should be reported as "the informat" by VINFORMAT?
... View more