FTP file transfer from mainframe application

0 pts.
Tags:
File Transfer
FTP
Mainframe
Receiving an FTP file transfer from a mainframe application. Does not have ability to issue syscmd or a rmtcmd to 400. Need to issue a job to copy the transfer file and kick off other jobs when a ftp file transfer occurs. If don't then if receive a second file transfer it will overwrite the data received, only getting a put ftp not an append.
ASKED: April 7, 2005  3:14 PM
UPDATED: August 22, 2013  6:36 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

what i did is to also create a dummy file, eg “PUSHRDY” or “PULLRDY”, eg, on as400 using clp/400

FTP RMTSYS ‘FTP.ECNET.COM’)
CHKOBJ OBJ(*LIBL/PUSHRDY) OBJTYPE(*FILE)
MONMSG MSGID(CPF9801) EXEC(DO)
xxxx………..

1) Mainframe sends a message/file (FILE A)
2) You check a flag. if flag is not there, this is “new” file, receive it. Create a dummy file (0 bytes)and “put” it there
3) do your necessary processing
4) complete processing, delete this flag (if u need to receive some more files.)

….

1) Mainframe sends again new file (FILE B)while u are processing FILE A
2) If your processing is not complete the flag is there
3) Your program starts polling by checking this flag FIRST. If flag is there, put the polling program to “sleep” for abt, eg, 30secs

Hope this helps

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Mayleong
    Hmmph...i just realised that your problem was that you have not pulled the file into your backend system and the mainframe system will thus overwrite the 1st file which it sends. in this case, get the mainframe programmer to agree to send a dummy file (0 bytes) called, eg, PUSHRDY as an indicator. Ask the programmer to check this indicator file. If he found the presence of PUSHRDY you have not received it/processed it, delay sending by putting "sleep" into the sending program on the mainframe For your end, poll the message by checking the "PUSHRDY" file. If the pushrdy file is there, there is a file for u to rec'd. Rec'd it, complete the processing (remembered to handle any obvious errors). check the return code from the processing, if no errors, DELETE this pushrdy so that the mainframe program will then know that u had processed the 1st file and can then send another Similarly, reverse this process if u are the one sending. U send with a dummy file after your msg. Basically, it means there are always at least 2 files, the actual msg and the dummy indicator file. If you are receiving or sending multiple files, always ONLY use a single indicator dummy file. When sending you can handle any obvious errors and ONLY send the indicator file when all processing is completed and okay (u dont want GIGO msg). This way, the receipent knows the files are all okay and can happily receives it. At the same time, receipents will only delete off the indicator when the processing is completed and error-free It will be more work, that is, you need to keep trying to receive and process the file until error free and need a way to send an error message to sender to resend same file/s when u have tried enough times. u determine the times u want to try. handling any errors is very impt in this case, esp the file contains impt data that u need. u can also do a passive monitoring by logging errors and still delete the dummy indicator file, but must have a way to get sender to resend same file, as u still need the file. perhaps offline, u can get sender to send and u download it onto notepad, etc, and see whether there are any errors or figure out what went wrong. both sender and receiver must have very good way of backing the files they sent/received so that cross-checking/auditing/resending is possible. once you have backup the files which u either sent/rec'd, u got another headache. that is, u now need to monitor the housekeeping and make sure that files which u have processed correctly and completely gets clean-out periodically to free the disk space, or the system administrator may take drastic actions on your behalf, esp when the files are very big and he is running at 90% disk capacity.
    0 pointsBadges:
    report
  • MichelleDavidson
    Search400.com member Drew Dekreon sent in this suggestion: "How about setting up a database trigger on the receiving file? Have the trigger submit a job that runs in, say three minutes after the trigger goes off."
    330 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following