Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Doc Trusted Contributor.
Trusted Contributor.
939 views

Sequential File creation.

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 ???

Tags (1)
0 Likes
8 Replies
Sheri_Dee
Visitor.

RE: Sequential File creation.

Hi Doc, is there possibly something in the File Description's Label Record or the Select's Organization settings causing the issue?
0 Likes
Doc Trusted Contributor.
Trusted Contributor.

RE: Sequential File creation.

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.
0 Likes
Doc Trusted Contributor.
Trusted Contributor.

RE: Sequential File creation.

Here are a couple of samples from the program opened up via notepad
0 Likes
buggabill Absent Member.
Absent Member.

RE: Sequential File creation.

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?

0 Likes
mhanson Absent Member.
Absent Member.

RE: Sequential File creation.

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.
0 Likes
jack_magielse Absent Member.
Absent Member.

RE: Sequential File creation.

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

RE: Sequential File creation.

Let me try Line Sequential
Doc Trusted Contributor.
Trusted Contributor.

RE: Sequential File creation.

Line Sequential Fixed it!
Thanks
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.