MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

reading ASCII on server, writing to M/F

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
jrever
Beginner


Joined: 12 May 2008
Posts: 3
Topics: 1

PostPosted: Tue May 13, 2008 12:09 pm    Post subject: reading ASCII on server, writing to M/F Reply with quote

Apologies in advance if this topic is covered elsewhere. I searched for refrences to this issue but could not find any.

My issue is this. I'm trying to read an ASCII file with CR/LF at the end of each record in order to write that file to a fixed blocked file on the mainframe.

The CR/LF is ignored at the end of the ASCII records so they are being picked up as one large record. I've yet to find a way of forcing the CR/LF to be recognized as end-of-record. Record volumes vary greatly on these files so parsing on the M/F side is not a solution.

My JCL is as follows. Any suggestions or references to other topics that I have missed in my searches would be greatly appreciated.
Code:

//MVS   DD DSN=JREVER.TEST.X,                               
//         DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,             
//         DCB=(LRECL=80,BLKSIZE=3120,RECFM=FB),           
//         SPACE=(TRK,(15,5),RLSE)                         
//HFS  DD PATH='/u/svcegate/hb_tsi_charge.txt',             
//     PATHDISP=(KEEP,DELETE),                             
//     PATHOPTS=(ORDONLY),                                 
//     PATHMODE=(SIRWXU,SIRGRP)                             
//SYSTSPRT DD SYSOUT=*                                     
//SYSTSIN  DD *                                             
OCOPY INDD(HFS) OUTDD(MVS) TEXT CONVERT(YES) PATHOPTS(USE)

_________________
jrever
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue May 13, 2008 12:38 pm    Post subject: Reply with quote

jrever,

what format are you using to FTP ? The FTP protocol for ASCII stream transfer requires two byte (carriage return, line feed) (x'0D0A') which the receiving end (z/OS) treats as line/record break. Unix has only LF (line feed) char (x'0A') which Unix expects as a record/line delimiter in text (character) files. Make sure the file has x'0D0A' at the end of every record
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jrever
Beginner


Joined: 12 May 2008
Posts: 3
Topics: 1

PostPosted: Tue May 13, 2008 1:56 pm    Post subject: Reply with quote

The ASCII file does indeed have the CR/LF characters hex'0D0A' terminating each line. When the records come across as one big stream the CR/LF are not included.
So something is stripping them off.
_________________
jrever
Back to top
View user's profile Send private message
jrever
Beginner


Joined: 12 May 2008
Posts: 3
Topics: 1

PostPosted: Tue May 13, 2008 1:58 pm    Post subject: Reply with quote

I should have said this up front: We're just putting in SFTP.
_________________
jrever
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group