View previous topic :: View next topic
|
Author |
Message |
herewego
New User
Joined: 20 Feb 2006 Posts: 14
|
|
|
|
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 |
|
|
Bharanidharan
New User
Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
|
|
|
|
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 |
|
|
herewego
New User
Joined: 20 Feb 2006 Posts: 14
|
|
|
|
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 |
|
|
luban
New User
Joined: 19 Nov 2005 Posts: 26 Location: Shanghai, China
|
|
|
|
Hi herewego,
I don't know if you have tried to find the bug by the offset 172.
Best regards,
Ban |
|
Back to top |
|
|
|