Ftp Error 0010
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/31421057/error-with-download-file-from-url workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs http://mainframegeek.me/abend-codes-and-explanation/ Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join ftp error them; it only takes a minute: Sign up Error with download file from url up vote 1 down vote favorite Regards. I have a problem when I download files from a url (ftp://garner.ucsd.edu/pub/rinex/), I'm automating the download, but I have trouble when they change the values of the URL and name files. When I run the script, made the first ftp error 0010 download, then the error ... where the fault lies? #!/usr/bin/python import shutil import urllib import urllib2 import sys, os import time, datetime import numpy as np def cods(n): codes = ['antc', 'areq', 'arev', 'bogt', 'braz', 'brft', 'bue1', 'bue2', 'cfag', 'chpi', \ 'copo', 'cord', 'coyq', 'falk', 'glps', 'iqqe', 'koug', 'kour', 'ispa', 'lpgs', \ 'mgue', 'parc', 'pove', 'qui1', 'qui2', 'recf', 'rio2', 'riop', 'salu', 'sant', \ 'savo', 'sptu', 'ufpr', 'unsa', 'valp'] return codes[n] def file_exists(location): request = urllib2.Request(location) request.get_method = lambda : 'HEAD' try: response = urllib2.urlopen(request) return True except IOError: return False if __name__=='__main__': days = (datetime.datetime(yy,mm,dd) -datetime.datetime(yy,1,1,0,0,0)).days for yy in np.arange(2010, 2015, 1): days = (datetime.datetime(yy+1,1,1,0,0,0)-datetime.datetime(yy,1,1,0,0,0)).days print 'Total days in '+str(yy)+': '+str(days) for dd in np.arange(1, days+1, 1): urldir = 'ftp://garner.ucsd.edu/pub/rinex/'+str('%04d'%yy)+'/'+str('%03d'%dd)+'/' for k in np.arange(0, 35, 1): # k is len(codes) gpsfile = cods(k)+str('%03d'%dd)+'0.'+str('%04d'%yy)[2:4]+'d.Z' if file_exists(urldir+gpsfile)==True: print 'Downloading '+gpsfile urllib.urlretrieve(urldir, gpsfile) else: print 'File no found '+gpsfile[j] The Error showed Downloading antc0010.08d.Z Downloading areq0010.08d.Z File no found arev0010.08d.Z Downloading bogt0010.08d.Z Downloading braz0010.08d.Z Downloading brft0010.08d.Z . . . . File no found sptu0010.08d.Z File no found ufpr0010.08d.Z
or worth reading for someone please like mainframegeek facebook page. Abend Codes Abend happens during the execution of a program in a step(JCL). Generally it can be categorized into system abend and user abend. System Abend - It will occurs when the system is not able to execute a statement which is coded in a program. This abend code will be thrown by OS. User Abend - This is due to unexpected condition occurs in data passed; this abend will be thrown by application based on the requirement. Condition Code Abends CC=0001 - (1016) PIE JOBS - BAD PART NUMBER - FOLLOW PACBOOK VERY CAREFULLY CC=001 - I/O ERROR CC=002 - I/O INVALID RECORD CC=0004 - DATASET NOT FOUND, TABLESPACE IN COPY PENDING, ETC MAY BE OK(CHECK COND STATEMENTS OR CALL ADM TO VERIFY) CC=0008 - EQUIP CHECK, UNABLE TO DBR DB RLAO00, RC-08 SQL ERROR, EMPTY DATASET CC=0010 - (CC=0016 IN HEX) BAD DATA CC=0012 - I/O ERROR TAPE, VSAM DATASETS CLOSED, INVALID DATA, EMPTY TABLE, COULD BE ANYTHING CC=0014 - CC=0016 - COULD BE ANYTHING, CONTENTION ,INVALID DATA, EMPTY TABLE, # OF FILES EXPECTED NOT EQUAL TO # OF FILES RECEIVED CC=0020 - COULD BE ANYTHING (CATCHALL) CC=0030 - DB2 TABLES WRONG DATES CC=0152 - ERROR ATTEMPTING TO TRANSLATE NEXT TRANSACTION CC=0696 - FTP LINE DOWN CC=804 OR 80A - REGION SIZE TOO SMALL - SPECIFY REGION=0M CC=1000 - BAD DATA, CONTENTION(-911) CC=1008 - TOTALS OUT OF BALANCE CC=1016 - NUMBER OF FILES EXPECTED DOES NOT EQUAL NUMBER RECEIVED, BAD DATA, CONTENTION CC=1999 - DATA EXCEPTION, BAD DATA CC=2000 - RESOURCE NOT FOUND (07D0), PROGRAMMING ERROR WAITING FOR FILE, RACF (-922), REBIND (-805) CC=2004 - CYCLE OUT OF SEQUENCE CC=2016 - TOO MUCH DATA FOR ARRAY SIZE, TABLE UPDATE INCORRECT, NULL DATA CC=2444 - INVALID RECORD LENGTH CC=8000 DATASET ALREADY IN USE, I/O ERROR, FILES NOT SENT RESOURCE NOT AVAILABLE CC=FFF - FATAL INTER ADDRESS COMMUNICATION ERROR User Abends U046 - NOT ENOUGH OR NO SORT WORK SPACE ALLOCATED. U048 - USER DOES NOT HAVE ACCESS AUTHOR