Desktop productivity for business analysts and programmers

Write hexadecimal binary file for upload to Mainframe

Reply
N/A
Posts: 0

Write hexadecimal binary file for upload to Mainframe

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
SAS Super FREQ
Posts: 8,818

Re: Write hexadecimal binary file for upload to Mainframe

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
N/A
Posts: 0

Re: Write hexadecimal binary file for upload to Mainframe

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
N/A
Posts: 0

Re: Write hexadecimal binary file for upload to Mainframe

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
Ask a Question
Discussion stats
  • 3 replies
  • 151 views
  • 0 likes
  • 2 in conversation