Skip to main content

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol
Hi Doc, is there possibly something in the File Description's Label Record or the Select's Organization settings causing the issue?

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol
Here is the select and the 1st 01 level.
SELECT 1099DATA
ASSIGN TO UX-1099DATA
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL
FILE STATUS IS UCT-STATUS
LOCK MODE IS MANUAL.

FD 1099DATA.

01 T-TRANSMITTER.
02 T-REC-ID PIC X.
* CONSTANT "T".
02 T-PAYMENT-YEAR PIC 9(4).
02 T-PRIOR-YEAR-IND PIC X.
02 T-TRANS-EIN PIC 9(9).
02 T-CONTROL-CODE PIC X(5).
02 FILLER PIC X(7).
02 T-TEST-IND PIC X.
02 T-FOREIGN-IND PIC X.
02 T-TRANS-NAME PIC X(40).
02 T-TRANS-NAME1 PIC X(40).
02 T-COMPANY-NAME PIC X(40).
02 T-COMPANY-NAME1 PIC X(40).
02 T-COMPANY-ADDRESS PIC X(40).
02 T-COMPANY-CITY PIC X(40).
02 T-COMPANY-STATE PIC XX.
02 T-COMPANY-ZIP PIC X(9).
02 FILLER PIC X(15).
02 T-NUMBER PIC 9(8).
02 T-CONTACT-NAME PIC X(40).
02 T-CONTACT-PHONE PIC X(15).
02 T-CONTACT-EMAIL PIC X(50).
02 FILLER PIC X(91).
02 T-SEQUENCE PIC 9(8).
02 FILLER PIC X(10).
02 T-VENDOR-IND PIC X.
02 T-VENDOR-NAME PIC X(40).
02 T-VENDOR-ADDRESS PIC X(40).
02 T-VENDOR-CITY PIC X(40).
02 T-VENDOR-STATE PIC XX.
02 T-VENDOR-ZIP PIC X(9).
02 T-VENDOR-CONTACT PIC X(40).
02 T-VENDOR-PHONE PIC X(15).
02 FILLER PIC X(35).
02 T-VENDOR-FOREIGN PIC X.
02 FILLER PIC X(8).
02 FILLER PIC XX.

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol
Here are a couple of samples from the program opened up via notepad

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol

What do your writes look like? Also, are you moving a "T" into that first field or are you using a 78 level piece of working storage?


Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol
A binary sequential file with variable length records will have a 2-byte (4-byte for maximum record size > 65535) record header to indicate the size of the record. (I don't see an indication of variable length records in your followup, but that would explain it.) Fixed length records don't require this header.

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol
Hi Doc,
Are you sure you need a sequential file (ORGANIZATION IS SEQUENTIAL) and not a line sequential file (ORGANIZATION IS LINE SEQUENTIAL)?

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol
Let me try Line Sequential

Creating a sequential file for 1099's to send to the IRS.

I am getting 2 mystery chars @ the front of the record.

When I open the file via notepad the first is displayed as STX and the second looks like an l with the caret on top. 

I move spaces to the 01 Level and write each different 01 level record.

I am doing this for W2's with no problem.

Is there some kind of record size limit or ???


#AcuCobol
Line Sequential Fixed it!
Thanks