IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

changing FTP return code


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
herewego

New User


Joined: 20 Feb 2006
Posts: 14

PostPosted: Thu Jun 22, 2006 8:22 pm
Reply with quote

Hi all,

I have a problem in changing the FTP return code.

requirement :
FTP step if the RC is 3712 give it as 04
if it is 00 give it as 00
if it is other than anything show it as failed with the RC.

I have written JCL.. but is is giving SOC04
The system detected a protection exception (System Completion Code=0C4)

Code:

//TEST     EXEC PGM=FTPRCODE,PARM='POSIX(OFF)/10.77.189.8 (EXIT
//STEPLIB  DD DISP=SHR,DSN=xxx.LOADLIBB                 
//OUTPUT   DD SYSOUT=*                                         
//SYSPRINT DD SYSOUT=*                                         
//SYSOUT   DD  SYSOUT=*                                       
//INPUT    DD  *                                               
id                                                 
pwd
get data
quit                                                         
/*


cobol is
Code:

ID DIVISION.                                 
PROGRAM-ID. FTPRCODE.                         
DATA DIVISION.                               
WORKING-STORAGE SECTION.                     
01  FTP              PIC X(8) VALUE 'FTP'.   
LINKAGE SECTION.                             
01  CALLER-PARM      PIC X(20).               
PROCEDURE DIVISION USING CALLER-PARM.         
    CALL FTP USING CALLER-PARM.               
    IF RETURN-CODE IS ZERO THEN GOBACK.       
    IF ( RETURN-CODE NOT = 3712 ) THEN GOBACK.
    MOVE 04 TO RETURN-CODE.                   
    GOBACK.     


Anybody have any idea what is wrong in this.

Thanks,
Herewego
Back to top
View user's profile Send private message
Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Fri Jun 23, 2006 9:57 am
Reply with quote

Did you forget the 2-byte parm length that must be included at the beginning of the linkage section? Your code must look something like this:
Code:

LINKAGE SECTION.                             
01  PARM-LENGTH      PIC S9(4) COMP.
01  CALLER-PARM      PIC X(20).               

Also, it looks like there is a mismatch in the number of bytes passed as parm from the JCL and the one declared (as 20) in linkage. You need to match them.
Try this and let us know.
Back to top
View user's profile Send private message
herewego

New User


Joined: 20 Feb 2006
Posts: 14

PostPosted: Fri Jun 23, 2006 12:01 pm
Reply with quote

Bharani,

Thanks for the reply.

I tried with that change also, but didn't work.

Still it is throwing the error message as given below

The system detected a protection exception (System Completion Code=0C4).
From entry point main at compile unit offset +00000172 at entry offset +00000172 at address 0D1E299A.

thanks,
Herewego.
Back to top
View user's profile Send private message
luban

New User


Joined: 19 Nov 2005
Posts: 26
Location: Shanghai, China

PostPosted: Sat Jul 01, 2006 10:05 pm
Reply with quote

Hi herewego,

I don't know if you have tried to find the bug by the offset 172.

Best regards,
Ban
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top