Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Creating File with Variable Recs - FTP send trailing spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Creating File with Variable Recs - FTP send trailing spaces
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: 7996
Location: Bellevue, IA

PostPosted: Thu Nov 27, 2008 8:23 am    Post subject:
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    Post subject: Removing FTP carriage control character??
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

Moderator Team Head


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

PostPosted: Tue Dec 02, 2008 12:10 am    Post subject: Reply to: Creating File with Variable Recs - FTP send traili
Reply with quote

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

http://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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us