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
 

 

Dataset upload from 3rd party

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
ashokakash

New User


Joined: 15 Nov 2006
Posts: 18
Location: Chennai

PostPosted: Tue Nov 20, 2007 6:25 pm    Post subject: Dataset upload from 3rd party
Reply with quote

1. a) I need to upload a dataset from 3rd party thru FTP. The below is the control I pass. The problem with this is it receives only 1 record of length 80 but third party sends more than 1000.

-r tls xxx.xxx.xxx.xxx (exit
cd in
GET op-file.txt 'XXXX.YYYY.AJ7J701' +
(REPLACE
quit

Can somebody guide me what is the problem here?

1. b) Otherwise it receives in ASCII format. Can anybody help me how to convert the ASCII format to EBCDIC format?


2. Sending dataset to 3rd party (record len is 145, last 12 bytes are spaces), it receives only 133 bytes in a record and ignores the spaces. Is there any way to resolve this issue?
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Tue Nov 20, 2007 6:35 pm    Post subject: Reply to: Dataset upload from 3rd party
Reply with quote

3.0 Chapter 3. File Transfer Protocol (FTP) from the z/OS V1R9.0 Comm Svr: IP User's Guide and Commands manual.

4.0 Chapter 4. Transferring data using the File Transfer Protocol (FTP) from the z/OS V1R9.0 Comm Svr: IP User's Guide and Commands manual.

5.0 Chapter 5. FTP subcommands from the z/OS V1R9.0 Comm Svr: IP User's Guide and Commands manual.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Nov 20, 2007 6:46 pm    Post subject: Re: Dataset upload from 3rd party
Reply with quote

I provided you with links to three chapters from the TCP/IP User's Guide that deal with configuring and using FTP. You'll need to spend some time reviewing them. I'm concerned that this post might be considered Off-Topic, since it seems to be a data problem caused by the 3rd party, not an FTP problem and not specifically a mainframe problem.

What type of OS is this 3rd party using? Is this file coming in from another IBM mainframe? Is it a VAX, Unisys, Unix, Linux, or Windows OS? Is the data properly formatted with all required record and EOF delimiters? Is the data text or is it binary? Is it EBCDIC or is it ASCII?

ashokakash wrote:
Sending dataset to 3rd party (record len is 145, last 12 bytes are spaces), it receives only 133 bytes in a record and ignores
the spaces. Is there any way to resolve this issue?


Refer to the manuals for the settings/commands used to preserve blank spaces at the end of the records (usually only needed when dealing with an EBCDIC-to-ASCII transfer to a Windows FTP server).
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Nov 20, 2007 7:29 pm    Post subject: Reply to: Dataset upload from 3rd party
Reply with quote

When I've encountered this type of situation in the past, I've always asked the 3rd party for a hex dump of at least a couple of records from their file.
Back to top
View user's profile Send private message
ashokakash

New User


Joined: 15 Nov 2006
Posts: 18
Location: Chennai

PostPosted: Tue Nov 20, 2007 7:39 pm    Post subject: Reply to: Dataset upload from 3rd party
Reply with quote

Thanks Superk. I will try going thru this and will ask the same questions to the 3rd party. I hope this will help me.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 20, 2007 9:41 pm    Post subject:
Reply with quote

Hello,

In addition to what Kevin has provided (and you really do want to spend time learning more about FTP if you are going to use it in a production environment), i believe you will be ahead if you pre-allocate the mainframe dataset.

I expect the transfer is being done in "binary" - if you are transferring "text" data, you should specify "ascii" for the transfer mode. Many ftp sessions default to "auto" or "binary" and both of these may result in unusable data on the receiving end.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Nov 20, 2007 9:49 pm    Post subject:
Reply with quote

dick scherrer wrote:
... i believe you will be ahead if you pre-allocate the mainframe dataset.


Why? I'd think you'd always be better off creating a new dataset (a GDG would be good) each time by specifying the disposition of the target DD with DISP=(NEW,CATLG,DELETE) in the FTP step.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 20, 2007 10:28 pm    Post subject:
Reply with quote

Hello,

Quote:
Why? I'd think you'd always be better off creating a new dataset
Possibly my bad icon_redface.gif I guess i'd agree as long as the mainframe was "pulling" the data. I'm remembering problems that may not be an issue for this upload.

The file problems i've had to deal with came up when the remote system needed to "push" the data (which is over 95% of the uploads i've been involved with) and then there were often dcb problems with the uploaded data.
Back to top
View user's profile Send private message
ashokakash

New User


Joined: 15 Nov 2006
Posts: 18
Location: Chennai

PostPosted: Wed Nov 21, 2007 12:54 pm    Post subject: Fileaid utilities are used
Reply with quote

I have given the jcl that I use for TSL FTP. That uses fileaid utilities. I do not know the O/S of the 3rd party but the data is converted to/from ASCII from/to EBCDIC is for sure.

I believe this would greatly help you give a fix to this issue.

1. Transfer from MF to 3rd party
-------------------------------------
Code:

//XYZDC171 EXEC PGM=UTYPSYM,REGION=512K,TIME=1,
//     PARM=('FTP,INPUT,OCYCLE=&OCYCLE'),
//UTYVSYS  DD DSN=XYZ.CONTROL(XYZXC171),DISP=SHR
//*INPUT WITH RESOLVED FTP  COMMANDS
//INPUT    DD DISP=(,DELETE,DELETE),
//            UNIT=TEMPDA,
//            BLKSIZE=0,
//            SPACE=(80,(1,1))
//OUTPUT   DD DSN=XYZE.C172.A&OCYCLE,
//            DISP=(,CATLG,DELETE),
//            UNIT=SYSD@,AVGREC=U,
//            DCB=(RECFM=FB,LRECL=160,BLKSIZE=0),
//            SPACE=(160,(1000,100),RLSE),
//            LABEL=RETPD=0030
//NETRC    DD  DSN=XYZ.CONTROL(XYZXC172),DISP=SHR
//*  BELOW CONTAINS SYSTEM TCP AND FTP PARMS
//SYSTCPD  DD  DSN=SYS7.TCPPARMS(TCPDATA),DISP=SHR
//SYSFTPD  DD  DSN=SYS7.TCPPARMS.SFTP(SFTP0002),DISP=SHR
//SYSOUT   DD  SYSOUT=A
//SYSPRINT DD  SYSOUT=A
//SYSUDUMP DD SYSOUT=(A,,DUMP),HOLD=YES


XYZ.CONTROL(XYZXC172) has the below information
---------------------------------
-r tls aaa.bbb.ccc.ddd (exit
cd out
PUT 'XYZE.C165.A&OCYCLE' input_order.txt
quit

Here the problem is 3rd party receives only file of rec length 133 since the dataset has spaces from 134 to 145.

2. Transfer from 3rd party to MF
Code:

//XYZDE102 EXEC PGM=UTYPSYM,REGION=512K,TIME=1,
//     PARM=('FTP,INPUT,OCYCLE=&OCYCLE'),
//UTYVSYS  DD DSN=XYZ.CONTROL(XYZXE102),DISP=SHR
//*INPUT WITH RESOLVED FTP  COMMANDS
//INPUT    DD DISP=(,DELETE,DELETE),
//            UNIT=TEMPDA,
//            BLKSIZE=0,
//            SPACE=(80,(1,1))
//OUTPUT   DD DSN=XYZE.E102.A&OCYCLE,
//            DISP=(,CATLG,DELETE),
//            UNIT=SYSD@,AVGREC=U,
//            DCB=(RECFM=FB,LRECL=160,BLKSIZE=0),
//            SPACE=(160,(1000,100),RLSE),
//            LABEL=RETPD=0030
//NETRC    DD  DSN=XYZ.CONTROL(XYZXE103),DISP=SHR
//*  BELOW CONTAINS SYSTEM TCP AND FTP PARMS
//SYSTCPD  DD  DSN=SYS7.TCPPARMS(TCPDATA),DISP=SHR
//SYSFTPD  DD  DSN=SYS7.TCPPARMS.SFTP(SFTP0002),DISP=SHR
//SYSOUT   DD  SYSOUT=A
//SYSPRINT DD  SYSOUT=A
//SYSUDUMP DD SYSOUT=(A,,DUMP),HOLD=YES


XYZ.CONTROL(XYZXE172) has the below information
---------------------------------
-r tls aaa.bbb.ccc.ddd (exit
cd in
LOCSITE WRAPRECORD
GET output_report.txt 'XYZE.E101.A&OCYCLE' +
(REPLACE
quit
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Wed Nov 21, 2007 8:37 pm    Post subject: Re: Fileaid utilities are used
Reply with quote

ashokakash wrote:

Here the problem is 3rd party receives only file of rec length 133 since the dataset has spaces from 134 to 145.


The FTP sub-command you need is TRAILingblanks:

TRAILingblanks Specifies that the FTP client preserves the trailing blanks in a fixed format data set when the data is sent to a foreign host.

You can permanently add this parameter to your SYSFTPD DD, or by using the LOCsite sub-command:

>LOCSIte TRAILingblanks
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Wed Nov 21, 2007 8:42 pm    Post subject: Re: Fileaid utilities are used
Reply with quote

ashokakash wrote:

Transfer from 3rd party to MF


From the same document:

Quote:

Rules
Do not use an end-of-line sequence other than CRLF if the server is a z/OS FTP server. The z/OS FTP server supports only the CRLF value for incoming data
Back to top
View user's profile Send private message
ashokakash

New User


Joined: 15 Nov 2006
Posts: 18
Location: Chennai

PostPosted: Wed Nov 28, 2007 8:01 pm    Post subject:
Reply with quote

Hi SuperK/Dick,

I should thank you for the support and help. It is almost all got over but I got a new requirement that the file from remote host should be deleted. For that I used the below command but that failed. Can you please correct me if it is wrong. Thanks in advance.

The new line included in the control card is as follows

r tls xxx.xxx.xxx.xxx (exit
cd in
LOCSITE WRAPRECORD
GET op-file.txt 'XXXX.YYYY.AJ7J701' (REPLACE
DELETE op-file.txt
quit


The errorlog contained the below

EZA1736I DELETE op-file.txt
EZA1701I >>> DELE op-file.txt
450 deletion failed
EZA1735I FTP Return Code = 13450, Error Code = 00002
EZA1701I >>> QUIT
221 Good-Bye
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Nov 29, 2007 4:27 am    Post subject:
Reply with quote

Hello,

You might have someone check that the id being used has permission to delete the dataset on the remote system.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Nov 29, 2007 7:02 am    Post subject:
Reply with quote

dick scherrer wrote:
You might have someone check that the id being used has permission to delete the dataset on the remote system.


Yup. It's rare that it does.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


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