BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello all,
I've changed jobs and have reverted from EG back to V9, however, I hope someone here can help me.
I need to create a hexadecimal binary file from a SAS dataset to be uploaded to the Mainframe for a COBOL module to use. I have written the following program:

data _null_;
file "E:\Probe_SM\Winter_2007\Active\Out\NTA_&monthkey..bin" lrecl=71 RECFM=F;
set libout.active2_NTA_&monthkey.;
put
@1 record_type $ebcdic2.
@3 customer_group $ebcdic20.
@23 customer_id $ebcdic11.
@34 filler $ebcdic9.
@43 account_id $ebcdic19.
@62 filler2 $ebcdic1.
@63 delq_status $ebcdic2.
@65 delq_days s370fZD3.
@68 curr_num_pymt_ahead s370fPD3.2
@71 write_off_acct_in $ebcdic1.
;
run;

It is based on the following COBOL definitions I have been given (the field names are slighly different but the order is the same):

RECORD-TYPE PIC X(2).
CUSTOMER-GROUP PIC X(20).
CUSTOMER-NUMBER PIC X(11).
FILLER PIC X(9).
ACCOUNT-NUMBER PIC X(13).
FILLER PIC X(7).
NTR-DELQ-STATUS PIX X(2).
NTR-DELQ-DAYS PIC 9(3).
NTR-NO-PYMT-AHEAD PIC S9(3)V99 COMP-3.
NTR-WRITE-OFF PIX X(1).

The Mainframe guy keeps coming back to me to tell me that the record is continuing past the last column (71) and the numeric fields aren't displaying correctly. Following is how it looks to him. The formatting is a bit wrecked. The 01 at the end of the first line should be the beginning of the second line. The last column of every line is the N.

BROWSE SRT1.S.NTA.ACTIVE.MATCH Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
01 60003 CC 1111222233334444 0 00{...N01
60003 MB 1234567890 1 00{..%N01
110007 CC 1111222233334444 0 00{...N01
110023 CC 1111222233334444 0 00{...N01 200010

Do I need to do something to signify the end of a line or does the Mainframe guy need to do something ? Also are my SAS number formats correct ?

Thanks for your help.
Regards
Tim
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
This is really the kind of question that is better answered by Tech Support -- it's not really an EG question. Since you are writing a DATA step program and have very specific data requirements, your best bet for a quick response is to try Tech Support, where they have access to a mainframe on which to test opening the created output file.

They can take a sample data set from you and test the program from creation to output file open on the other system, if they need to. If your output needs a CRLF character, they can help you find out which is the correct CRLF or End-of-Record marker or translation table to use. To find out how to contact Tech Support, refer to: http://support.sas.com/techsup/contact/index.html

Good luck!
cynthia
deleted_user
Not applicable
Cynthia's advice is, as always, platinum.

I suggest you also review the following SN "SN-V8+-003715 SAS formats that correspond to COBOL data descriptions".

You should also look again at your definition for FILLER2. Your column and format specifications refer to one byte, but the file specification is not one byte.

Kind regards

David
deleted_user
Not applicable
Hi Cynthia and David,

Thanks ever so much for your help. I will try to contact Tech Support.

David you are right, the COBOL definition for account_id and filler2 has changed since the document I am using was issued.

All the best.

Tim

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 796 views
  • 0 likes
  • 2 in conversation