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
 

 

changing FTP return code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: changing FTP return code
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    Post subject: Re: changing FTP return code
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 1 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am


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