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.

Replacing carriage return line feed with line feed in C:D

Postby saikat09 » Sat Dec 14, 2013 9:33 am

Hi,

Is it possible to replace carriage return line feed with just line feed while doing text transfer using connect direct from mainframe to unix?

Saikat
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:

Postby NicC » Sat Dec 14, 2013 4:32 pm

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: 3025
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:

Postby Robert Sample » Sat Dec 14, 2013 6:20 pm

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: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Replacing carriage return line feed with line feed in C:

Postby saikat09 » Sun Dec 15, 2013 10:45 am

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:

Postby NicC » Sun Dec 15, 2013 11:35 pm

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: 3025
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:

Postby saikat09 » Mon Dec 16, 2013 4:25 pm

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:

Postby NicC » Mon Dec 16, 2013 5:47 pm

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: 3025
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

 


  • Related topics
    Replies
    Views
    Last post