Hello Team,
I am getting warning message for some of my jobs after the z/OS 2.2 upgrade.
Current SAS level – SAS 9.4
MICS – 12.9
Please find the attached sheets for reference. 1. Job log. 2. Job. 3.output of job.
In the below warning message when we try to merge the member with different length variables we are getting. For us the Date and Time variables lengths are mismatching. But we are not getting this before the z/OS upgrade.
Please advice what shall we do on this. Thank you.
TIME Num 8 TIME5.
TIME Num 5 TIME5.
MPRINT(SCAP): DATA SCAPINF1 (KEEP
MPRINT(SCAP): =SYSID DATE HOUR DURATION PGCPU1-PGCPU200 PGSRB1-PGSRB200 PGSIO1-
MPRINT(SCAP): ARRAY ALLV
MPRINT(ALLVVARS): PGCPU1-PGCPU200 PGSRB1-PGSRB200 PGSIO1-PGSIO200 PGFRM1-PGFRM
MPRINT(SCAP): ;
MPRINT(SCAP): MERGE SASDDF.SCAPINF1 SASDDF.S71;
MPRINT(SCAP): BY SYSID DATE TIME;
MPRINT(SCAP): DO OVER ALLV;
MPRINT(SCAP): ALLV=ALLV*DURATION;
MPRINT(SCAP): END;
MPRINT(SCAP): HOUR=HOUR(TIME);
100 The SAS System
MPRINT(SCAP): IF ((10<=HOUR<=12) | (14<=HOUR<=16));
MPRINT(SCAP): FORMAT DATE DATE7.;
WARNING: Multiple lengths were specified for the BY variable DATE by input data
statements. This might cause unexpected results.
You need to check further up how those datasets were created, and set the correct lengths there. A length of 5 should be sufficient for a date, so I suggest to look at the dataset where it has a length of 8.
I don't think your z/OS has something to do with this; when did you upgrade to SAS 9.4?
Investigate what created SASDDF.SCAPINF1 SASDDF.S71 data sets.
Or search your code for something like: Length date 5 ; or Length Time 5; in prior steps. SAS defaults to length 8 for numeric fairly universally so someone may have added the length statements to save a couple bytes of storage per record, possibly 20 years ago if programs keep getting updated...
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.