How to Replace a Line Feed With Cr Lf Java
Replacing carriage return line feed with line feed in C:D
All other tools like QACenter, Strobe, Endevor, Telon, APAS, Scheduler, Auditor, DATA-XPERT, CoolGen, Intertest, AdvantageGen, COBTEST etc.
Re: Replacing carriage return line feed with line feed in C:
If by mainframe you mean z/OS and not USS then mainframe does not use CRLF. It uses the LRECL from the DCB info (or the RDW for VB files). So where are you getting your CRLFs from?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
- NicC
- Global moderator
- Posts: 3026
- Joined: Sun Jul 04, 2010 12:13 am
- Location: Pushing up the daisies (almost)
- Has thanked: 4 times
- Been thanked: 136 times
Re: Replacing carriage return line feed with line feed in C:
What did the product documentation tell you when you read it?
FTP, for example, allows the end-of-line terminator to be specified. Whether or not this can be done with Connect:Direct, however, requires someone look at the documentation. As long as your site is licensed for the product, you have access to the documentation -- via hard copy at your site, or an internal web site, or by contacting the vendor to read or download the documentation. An answer on this forum will depend upon someone using the same product to accomplish the same task and being willing to respond -- an answer from the documentation merely requires you to find it and read.
- Robert Sample
- Global moderator
- Posts: 3692
- Joined: Sat Dec 19, 2009 8:32 pm
- Location: Dubuque, Iowa, USA
- Has thanked: 1 time
- Been thanked: 275 times
Re: Replacing carriage return line feed with line feed in C:
The CRLF are embedded in mainframe[Z/OS] files by application programs. I can replace CRLF by LF programatically before pushing the file for C:D. But I would like to know if its possible to handle this via C:D. If there is any unix command to replace CRLF with LF which can be invoked via C:D runtask or some other alternative approach. I have read the product documentation but couldn't find the exact answer to my question.
- saikat09
- Posts: 5
- Joined: Thu Dec 12, 2013 11:39 am
- Has thanked: 0 time
- Been thanked: 0 time
Re: Replacing carriage return line feed with line feed in C:
As the CRLF is the Dos line end and LF is the unix one you can try running the file through the dos2unix utility which does this conversion for you. Whether you can call this from C:D I do not know.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
- NicC
- Global moderator
- Posts: 3026
- Joined: Sun Jul 04, 2010 12:13 am
- Location: Pushing up the daisies (almost)
- Has thanked: 4 times
- Been thanked: 136 times
Re: Replacing carriage return line feed with line feed in C:
I am not using Dos. I am transferring file from mainframe to unix. Below is C:D script:-
CDEMDOUT PROCESS PNODE=&PNODE SNODE=&SNODE
SYMBOL &PCFILE="&ACK"
STEP1 COPY FROM(PNODE DSN=&DSN1 -
DISP=SHR) -
TO(SNODE DSN=&PCFILE -
SYSOPTS=":strip.blanks=no:" -
DISP=RPL -
TYPE=TEXT) -
CKPT=100K -
COMPRESS
IF (STEP1 > 0) THEN
STEP2 RUN TASK (PGM=MDNOTIFY) PNODE
EIF
Please let me know what ammendment is required in this script to replace CRLF with LF.
- saikat09
- Posts: 5
- Joined: Thu Dec 12, 2013 11:39 am
- Has thanked: 0 time
- Been thanked: 0 time
Re: Replacing carriage return line feed with line feed in C:
No one said you were using DOS but CRLF is the DOS line-end identification. This can be converted to *nix line-end (LF) using the utility dos2unix which runs under *nix so transfer your file to *nix and run it through dos2unix and you have nice *nix line-end characters. The alternative is to get whatever produces the dataset in the first place to produce the correct line-end sequence for your requirement rather than trying to shoe-horn in a kludge that should not really be needed.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
- NicC
- Global moderator
- Posts: 3026
- Joined: Sun Jul 04, 2010 12:13 am
- Location: Pushing up the daisies (almost)
- Has thanked: 4 times
- Been thanked: 136 times
Return to All Other Tools
Source: https://www.ibmmainframeforum.com/all-other-tools/topic9674.html
0 Response to "How to Replace a Line Feed With Cr Lf Java"
إرسال تعليق