ERROR: Bad request. Use the debug option for more info.

Reply
New Contributor
Posts: 3

ERROR: Bad request. Use the debug option for more info.

Hi,

I'm trying to read a mainframe GDG file in SAS EG but i'm getting this error 'ERROR: Bad request. Use the debug option for more info.' when trying to read the file.

Please find below the log for reference. due to security reasons I'm masking and deleting some filed's

I'm using SAS EG 6.1 version.

Log:

filename in1 ftp "ABC.XYZ(0)'" user="&MF_Id." pass = "&MF_Pass."
host = "&MF_Host." lrecl=2100 debug cd=ABC.XYZ.'
rcmd=' site blocksize=27300 RECFM=v lrecl=2100 ';

data  _null_;
infile in1 missover lrecl=2100 end=eof1 obs=1;
input @0013 first_value $15. ;
run;

 

NOTE: >>> USER XX
NOTE: <<< 331 Send password please.
NOTE: >>> PASS XXXXXXX
NOTE: <<< 230 XX is logged on.  Working directory is "XX.".

NOTE: <<< 200 Port request OK.
NOTE: >>> TYPE A
NOTE: <<< 200 Representation type is Ascii NonPrint
NOTE: >>> CWD ABC.XYZ.
NOTE: <<< 250 "XX.ABC.XYZ." is the working directory name prefix.
NOTE: >>> PWD
NOTE: <<< 257 "'XX.ABC.XYZ.'" is working directory.
NOTE: >>> site blocksize=27300 RECFM=v lrecl=2100
NOTE: <<< 200 SITE command was accepted
NOTE: >>> RETR 'ABC.XYZ(0)'
NOTE: <<< 125 Sending data set ABC.XYZ.G0337V00 FIXrecfm 2100
NOTE: User XX has connected to FTP server on XXX.
NOTE: The infile IN1 is:
      Filename=ABC.XYZ(0)',
      Pathname= "'XX.ABC.XYZ.'" is working directory,

      Service Name=FTP,Service Portno=21,Lrecl=2100,
      Recfm=Variable

NOTE: <<< 451 Transfer aborted: send error.
NOTE: >>> QUIT
ERROR: Bad request. Use the debug option for more info.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):

Can you please help me in getting this error fixed.

Thanks & Regards,

Venu.

Trusted Advisor
Posts: 3,212

Re: ERROR: Bad request. Use the debug option for more info.

Venu, Getting a file from z/OS (GDG is in z/OS) does not need any fileattributes. These are part of the DS-attributes on Z/OS and should be read automatically.

Having one failure in that will cause unpredictable results. Look in the syslog (TSO SDSF) whether you can find a more specified errormessage.

Looking at your log is seem to me ebcdic/ascii translation is part of this ftp session. This only will work with character data not with often used PD/Zoned fields and by no way with binary fields.

Beware of encoding issues is as not all encodings are equal.  If you have binary data, you can switch to a binary download. SAS is able to process that on other machine-types.

---->-- ja karman --<-----
New Contributor
Posts: 3

Re: ERROR: Bad request. Use the debug option for more info.

Hi Jaap,

I'm reading the Mainframe file from Windows SAS (SAS EG). I have been doing this from long time (almost 2 yrs). I'm facing this error from past 2 weeks. There is no binary data in the Mainframe file.

One more intrusting point is, when I remove the obs=1 option from the data step and try to read the entire file it runs thru fine  without any error.

filename in1 ftp "ABC.XYZ(0)'" user="&MF_Id." pass = "&MF_Pass."

host = "&MF_Host." lrecl=2100 debug cd=ABC.XYZ.'

rcmd=' site blocksize=27300 RECFM=v lrecl=2100 ';

data  _null_;

infile in1 missover lrecl=2100 end=eof1 obs=1;

input @0013 first_value $15. ;

run;

I want to understand what changed all of sudden that I'm getting this error. I have not touched this code from past 2 yrs. Why this step is running without any error when I'm reading entire file and why I'm getting the error when i read only 1 observation.

Trusted Advisor
Posts: 3,212

Re: ERROR: Bad request. Use the debug option for more info.

You just debugged the problem issue to the obs=1 usage of the infile statment. SAS(R) 9.4 Statements: Reference, Third Edition   SAS(R) 9.4 Statements: Reference, Third Edition

There is no limitation of usage documented in the combination FTP. I can imagine you cannot stop the ftp process anyway when it has started. The obs=1 option limiting the size would only by useful when the ftp proces would support that.    Time to get TS involved I think.
   

---->-- ja karman --<-----
New Contributor
Posts: 3

Re: ERROR: Bad request. Use the debug option for more info.

Hi Jaap,

Thanks for your response..

Can you please help me how to get TS (Technical Support) team involved to get this issue resolved.

I have been trying to fix this error but I seriously don't understand the cause of the error.. So i'm directionless in getting this error fixed.. 

Thanks,

Venu.

Trusted Advisor
Posts: 3,212

Re: ERROR: Bad request. Use the debug option for more info.

SAS TS is the famous SAS support see: Support  This is direct world wide visible approach.

It goes normally with an internal SAS contact at your company. He can organize internal contacts in your company and other support eg mainframe guys.  His contact is often the TS support for each country. Did you ever played the communication game going over several stations? Laughed about how much went lost and got different?

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 5 replies
  • 620 views
  • 0 likes
  • 2 in conversation