Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us