DATA Step, Macro, Functions and more

problem with Zw.d format while moving from SAS V9.1.3 to SAS V9.2

Reply
Occasional Contributor
Posts: 16

problem with Zw.d format while moving from SAS V9.1.3 to SAS V9.2

Hello All,
I use base sas in a Z/OS environment.

We have an existing code running without problems in production environment running on SAS V9.1.3 as shown below

SAS PGM1 writes data to an external mainframe flat file in the below format.
PUT @1 PARTNO $CHAR18.
- - -
@52 PKGQTY Z5.
@57 NET Z16.2
@73 LIST Z16.2
@89 EXCH_NET 16.2
@105 EXCH_LST 16.2
@121 RET_CR_NET 16.2
@137 RET_CR_LST 16.2
- - -
@163 PER_100 $CHAR01.
@164 WEIGHT Z10.4
@174 LRGDIM Z9.3
@183 MEDDIM Z9.3
@192 SMLDIM Z9.3
@201 PACTU $CHAR04.
- - -
;

SAS PGM2 reads the same file using below informat
INPUT @1 PARTNO $CHAR18.
---
@52 PKGQTY 5.
@57 NET 16.2
@73 LIST 16.2
@89 EXCH_NET 16.2
@105 EXCH_LST 16.2
@121 RET_CR_NET 16.2
@137 RET_CR_LST 16.2
---
@163 PER_100 $CHAR01.
@164 WEIGHT 10.4
@174 LRGDIM 9.3
@183 MEDDIM 9.3
@192 SMLDIM 9.3
@201 PACTU $CHAR04.
---
;
after some processing PGM2 writes the data to another external file in the same format that PGM1 had written to external file.

Now we we run the same code in our test environment that runs on SAS V9.2 , PGM2 is failing to write the data to external file in the format specified. the field values are not getting written in proper positions.

The input file used in both production and test environment was the same.

I am getting the below note in sas spool
NOTE: There were 42477 observations read from the data set WORK.PRFILE.
NOTE: At least one W.D format was too small for the number to be printed.The decimal may be shifted by the "BEST" format
.


Can anybody help me understand what is going wrong ?
Super Contributor
Super Contributor
Posts: 3,174

Re: problem with Zw.d format while moving from SAS V9.1.3 to SAS V9.2

You claim that PGM2 writes an external file but you fail to share the PUT logic used. Also, without seeing at least sample/representative data to demonstrate what you data might look like is limiting constructive info / feedback, in my opinion.

One option is to go directly to SAS Tech Support with all your detailed information, logs, data-sample, and open a track / issue to report your problem symptom. Otherwise, I would recommend you create an instream DATALINES; example that demonstrates what data you have difficulty with, and provide exact SAS logs with PUTLOG _ALL_; and LIST; command type supporting information, for the forum subscribers (and lurkers equally important).

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 435 views
  • 0 likes
  • 2 in conversation