BookmarkSubscribeRSS Feed
saroj
Calcite | Level 5
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 ?
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1131 views
  • 0 likes
  • 2 in conversation