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

Creating File with Variable Recs - FTP send trailing spaces


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

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Thu Nov 27, 2008 4:15 am
Reply with quote

I am writing a file with variable length records like this:
Code:
FD  IR37OUT-FILE
    LABEL RECORDS ARE STANDARD
    RECORDING MODE IS V
    RECORD CONTAINS 12 TO 234  CHARACTERS
    BLOCK CONTAINS 0 RECORDS
    DATA RECORDS ARE
                     IR37OUT-0001-REC
                     IR37OUT-2000-REC
                     IR37OUT-2011-REC
                     IR37OUT-2011-REC-2
                     IR37OUT-2012-REC
                     IR37OUT-2015-REC
                     IR37OUT-2099-REC
                     IR37OUT-9999-REC.
   01  IR37OUT-0001-REC                  PIC X(074).
   01  IR37OUT-2000-REC                  PIC X(12).
   01  IR37OUT-2011-REC                  PIC X(234).
   01  IR37OUT-2011-REC-2               PIC X(197).
   01  IR37OUT-2012-REC                  PIC X(112).
   01  IR37OUT-2015-REC                  PIC X(41).
   01  IR37OUT-2099-REC                  PIC X(32).
   01  IR37OUT-9999-REC                  PIC X(37).

0320-STRING-2011-REC.
    MOVE SPACES TO    IR37OUT-2011-REC.
    STRING
             WK-2011-RECORD-ID, '|',
             WK-2011-MERCHANT-CODE, '|',
             WK-2011-PASSWORD, '|',
             WK-2011-ORIG-TRANSACTION-ID, '|',
             WK-2011-USER-PART1, '|',
             WK-2011-USER-PART2, '|',
             WK-2011-USER-PART3, '|',
             WK-2011-LOCATION-CODE,  '|',
             WK-2011-ROLL-YEAR, '|',
             WK-2011-USER-PART6
                               DELIMITED BY '  '
                  INTO   IR37OUT-2011-REC.
0320-EXIT.

The output file looks like this:
Code:
0001|LOS ANGELES COUNTY||1.0|2008-11-25T10:22:15|INPUT
FFFF4DDE4CDCCDCE4CDEDEE44F4F4FFFF6FF6FFEFF7FF7FF4CDDEE444444
0001F362015753520364538FF1B0F2008011025310A22A15F957430000000
 ------------------------------------------------------------------------------
2000|REFUNDS
FFFF4DCCEDCE
2000F9564542
 ------------------------------------------------------------------------------
2011|06LAX-TREAS-BSLRS-W|TESTPASS12|4004619879||||526|0000||
FFFF4FFDCE6EDCCE6CEDDE6E4ECEEDCEEFF4FFFFFFFFFF4444FFF4FFFF444
2011F0631703951202239206F3523712212F4004619879FFFF526F0000FF00
 ------------------------------------------------------------------------------
The customer is going crazy that when I FTP the file there are trailing spaces after all the 0001 and 2011 record types I built. The 2000 record type looks okay.

The difference is that the 0001 and 2011 records final/last field is being supressed, so this command seems to move spaces into the record to make up for it not being there.

Should I move nulls or low-values to the record before I string the fields to it? Should I "delimiting by" with something else?

If you can think of anything to try, please advise.
Thank you so much for your help.
~Sharon


Edited: Please use BBcode when You post some code, that's rather readable, Thanks...Anuj
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Nov 27, 2008 8:23 am
Reply with quote

Have you tried adding
Code:
//SYSFTPD DD *
TRAILINGBLANKS FALSE
/*
to your FTP job?
Back to top
View user's profile Send private message
Sysaron

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Tue Dec 02, 2008 12:02 am
Reply with quote

I tried the FTP using TRAILINGBLANKS False and it still didnt seem to help,
so Im going to rewrite the program to write alternative records when the final field is spaces.

Is there anythng I can do to remove the "square" carraige return that the FTP puts at the end of each line?

Thank you very much, Sharon

2015|4004619881|001|000000000000000050.00
2099|00006|000000000000000644.00
9999|0000020|01|000000000000000644.00
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Dec 02, 2008 12:10 am
Reply with quote

The same spot in the manual as the TRAIL sub-parameter:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B970/5.35?SHELF=F1A1BK90&DT=20070530175427
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top