View previous topic :: View next topic |
Author |
Message |
Bharath.AK Beginner
Joined: 13 Jul 2007 Posts: 34 Topics: 10 Location: Los Angeles
|
Posted: Fri Feb 29, 2008 3:47 am Post subject: NDM (C:D) |
|
|
Hi,
Need a favor please!
Scenario:
I have a 'Flat file' of LRECL 1000, in which not every record is populated till 1000th position. I mean the Flat file is not of fixed width.
I need to transmit this file to a secured FTP site (thru NDM/C) from where users will download that file for their use.
Now, the transmitted file should be of fixed width format which means the LRECL should be of 1000 but not less than that - no matter each record is of 1000 length.
I know this can be handled with 'PRESERVE ON' option, but not sure where to apply it -
whether in an NDM JCL (as the process is automated - scheduled Jobs)
or in the NDM PROC.
Please help!
For your reference:
Job:
Code: |
//STEP1 EXEC NDMBATCH
//*
//SYSIN DD *
SIGNON USERID=(XX) ESF=YES
SUBMIT PROC=NDMPROC -
&INDSN='Flat.File.to.tranmit' -
&OUTDSN='destination.file.name' SIGNOFF
//
|
PROC:
Code: | NDMPROC PROCESS
HOLD=NO
PNODE=Sending_node
SNODE=Dest_node
COPYDSN COPY FROM (PNODE DSN=&INDSN DISP=SHR) -
TO (SNODE DSN=&OUTDSN ) -
COMPRESS EXT |
_________________ Regards,
BK
***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " ***** |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Feb 29, 2008 7:22 am Post subject: |
|
|
I can't find a reference to the parameter 'PRESERVE ON' in any of my Connect:Direct product manuals. Where did you read about this? |
|
Back to top |
|
|
Bharath.AK Beginner
Joined: 13 Jul 2007 Posts: 34 Topics: 10 Location: Los Angeles
|
Posted: Fri Feb 29, 2008 7:25 am Post subject: |
|
|
I've seen it in the mainframes help itself - 'QW PRESERVE'. I thought I can use this. If you have any other alternative, pls suggest me. _________________ Regards,
BK
***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " ***** |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Feb 29, 2008 7:33 am Post subject: |
|
|
As far as I know PRESERVE is an ISPF Edit profile keyword for when you are editing VB datasets.
I would have thought that a file transfer program would preserve the integirty of a file so if it is FB when it leaves one place it should be FB when it arrives at its destination. If you recieve it into a pre-allocated FB file then I would have thought there would be no problem. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
Bharath.AK Beginner
Joined: 13 Jul 2007 Posts: 34 Topics: 10 Location: Los Angeles
|
Posted: Fri Feb 29, 2008 7:40 am Post subject: |
|
|
Hey thanks for your response.
One more question please, if not in NDM, can we do anything about it in JCL or wherever?
because we have no control over the source file. We just copy it into another flat file and transmit it. _________________ Regards,
BK
***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " ***** |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Feb 29, 2008 7:45 am Post subject: |
|
|
You have a VB file and you want to convert it to FB? Use any of sort, IEBGENER, a program (even a Rexx script) or anything else that is a file copy utility. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
Bharath.AK Beginner
Joined: 13 Jul 2007 Posts: 34 Topics: 10 Location: Los Angeles
|
Posted: Fri Feb 29, 2008 7:51 am Post subject: |
|
|
I think my requirement is misunderstood. I have no problem with the mainframe file(s) as they are of FB. The problem is when I transfer it to an FTP site - where the file is not being an FB when users download it as a .TXT or some other form of document/tool.
When i transfer it to another mainframe box, then no problem. problem is when transmitting it to 'non-mainframe' environment. _________________ Regards,
BK
***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " ***** |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Sun Mar 02, 2008 5:19 pm Post subject: |
|
|
I think there is a "COMPRESS SPACES" or "COMPRESS BLANKS" option, or something similar. I'll see if I can find it at work tomorrow. _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Sun Mar 02, 2008 5:42 pm Post subject: |
|
|
FB, VB, F, and V are basically meaningless any where other then on the mainframe. A .TXT file on a windows system wouldn't have trailing spaces. |
|
Back to top |
|
|
Bharath.AK Beginner
Joined: 13 Jul 2007 Posts: 34 Topics: 10 Location: Los Angeles
|
Posted: Sun Mar 02, 2008 9:09 pm Post subject: |
|
|
That would be great Mervyn!
My users are non-technical and won't understand all these things. So, trying to figure out the way for doing this. Any help/info. would definitely help me _________________ Regards,
BK
***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " ***** |
|
Back to top |
|
|
Bharath.AK Beginner
Joined: 13 Jul 2007 Posts: 34 Topics: 10 Location: Los Angeles
|
Posted: Wed Mar 05, 2008 6:58 am Post subject: |
|
|
I got a solution for this while doing some trail & error. Thanks to all!
Code is below, if in case you need it! Only the PROC needs to be changed-
Code: |
NDMPROC PROCESS
HOLD=NO
PNODE=Sending_node
SNODE=Dest_node
COPYDSN COPY FROM (PNODE DSN=&INDSN DISP=SHR) -
TO (SNODE DSN=&OUTDSN -
SYSOPTS=":STRIP.BLANKS=NO:") -
COMPRESS EXT |
_________________ Regards,
BK
***** " If You Have To Do It, You Might As Well Do It Right.....If It Is Worth Doing At All, It's Worth Doing It Right !!! " ***** |
|
Back to top |
|
|
|
|