IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Maximum number of digits for a field


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
George Tillmon

New User


Joined: 22 Mar 2010
Posts: 27
Location: Montgomery, AL

PostPosted: Thu Apr 08, 2010 12:17 am
Reply with quote

Hi.

I am trying to load several fields with spaces in a record.
The first field is 2192 (header record) , the second is 22 (detail record)and the third is 2185 (trailer record).
The total length of each record is 2220.

Why are spaces not showing in the file?
Everything looks fine until I use a text editor and there are no spaces.
Which causes the Federal Government, to whomo I send the file, to have a conniption.

Maybe the header and trailer records I can understand, but not the detail record. The field I am trying to fill with spaces is only 22 bytes long.

So, is the length of my header and trailer records to long for cobol to use? I do not get an error when I compile the program or execute the job.

Thanks,
George
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 08, 2010 12:23 am
Reply with quote

Line 317 is your problem.

Seriously, if you don't show us what code you're using, information about the file, and what you're getting for output already -- how on earth do you expect to get any realistic help? Furthermore, your subject is about digits in a field but you are talking about spaces in a record. Terminology is critical in IT and so far you have mixed terminology so bad I don't think anybody can understand exactly what it is you want to do!
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 08, 2010 12:45 am
Reply with quote

George Tillmon wrote:
I am trying to load several fields with spaces in a record.
The first field is 2192 (header record) , the second is 22 (detail record)and the third is 2185 (trailer record).
The total length of each record is 2220.
Are you mistaken? Three fields in one record?
2192+22+2185=2220?

Appendix B. Compiler limits
Max 01-49 data item size is 134,217,727 bytes
Max Elementary item size is 134,217,727 bytes
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Apr 08, 2010 12:46 am
Reply with quote

What does your problem have to do with the subject line "Maximum number of digits for a field"? Are you filling the fields with spaces or low-values?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 08, 2010 1:19 am
Reply with quote

Hello,

How many level 01 entries are there for the FD for this output file?

Which text editor are you using? Mainframe or after the data is downloaded? If you browse the file on the mainframe with HEX ON, are the spaces in the records or are these veriable length and so are truncated at lrecl?

How is the data downloaded? Often, trailing spaces are deleted . . .
Back to top
View user's profile Send private message
George Tillmon

New User


Joined: 22 Mar 2010
Posts: 27
Location: Montgomery, AL

PostPosted: Thu Apr 08, 2010 1:31 am
Reply with quote

I am writing from three different 01 levels.
All files are fixed block.

I am using PsPad on the pc to look at the file after using Filezilla to download the file from the mainframe to my pc.

Yes, trailing spaces are being deleted, however, the Feds and I are not into agreement over this.

When I browse the file on the mainframe, with HEX ON, it shows 40. There are spaces in the proper places.

Thanks,
George
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 08, 2010 1:44 am
Reply with quote

Quote:
I am using PsPad on the pc to look at the file after using Filezilla to download the file from the mainframe to my pc.

Yes, trailing spaces are being deleted, however, the Feds and I are not into agreement over this.

When I browse the file on the mainframe, with HEX ON, it shows 40. There are spaces in the proper places.
So you are saying that displayed on the MF all is good but after transferring it to your PC all is bad?
Maybe it's the transfer?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 08, 2010 1:46 am
Reply with quote

Are you transferring the file to the Feds via FTP?
If so, there is an option in FTP to suppress trailing blanks -- if set that could cause the trailing spaces to not be transferred. You would need to work with your site support group to confirm this. You could test with
Code:
//SYSFTPD DD *
TRAILINGBLANKS TRUE
/*
added to your FTP job.
Back to top
View user's profile Send private message
George Tillmon

New User


Joined: 22 Mar 2010
Posts: 27
Location: Montgomery, AL

PostPosted: Thu Apr 08, 2010 5:18 pm
Reply with quote

Thanks for all the assistance.

I am using Filezilla to download the file from the mainframe to one of our lan locations.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 08, 2010 7:48 pm
Reply with quote

George Tillmon wrote:
I am using Filezilla to download the file from the mainframe to one of our lan locations.
Is Filezilla suppressing the trailing blanks?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 08, 2010 8:03 pm
Reply with quote

While Filezilla documentation is not clear on the point, there is at least a strong possibility that Filezilla does not deal with trailing spaces in data files. You should try another download method that does handle the trailing spaces to see if your problem is cleared up.
Back to top
View user's profile Send private message
George Tillmon

New User


Joined: 22 Mar 2010
Posts: 27
Location: Montgomery, AL

PostPosted: Thu Apr 08, 2010 8:09 pm
Reply with quote

Thank you.

That is what I am in the process of doing. I have contacted one of our pc technical professionals to do a maniframe to lan ftp.

I am looking to see about another ftp application also.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
Search our Forums:

Back to Top