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
 

 

To get batch jobs status code using FTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Purni

New User


Joined: 04 Nov 2009
Posts: 7
Location: USA

PostPosted: Fri Aug 27, 2010 3:06 am    Post subject: To get batch jobs status code using FTP
Reply with quote

I am doing the following
ftp IP Address
User ID
Password
quote site filetype=jes
dir
But I am getting output as follow:

ftp> dir
200 Port request OK.
125 List started OK
XXXXXX1 T1128194 OUTPUT 3 Spool Files
XXXXXX1 T1128196 OUTPUT 3 Spool Files
XXXXXX2 T1129131 OUTPUT 3 Spool Files
XXXXXXW T1129139 OUTPUT 10 Spool Files
XXXXXXK T1129144 OUTPUT 10 Spool Files

I also need the Max-RC which I am not getting.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Aug 27, 2010 3:30 am    Post subject:
Reply with quote

PARM='(EXIT' on the FTP execution step of the JCL will set the step condition code to the FTP results -- but I'm not sure from what you've said that this is what you want. The FTP condition code for what you posted would be zero since all the commands worked.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Aug 27, 2010 4:58 am    Post subject: Reply to: To get batch jobs status code using FTP
Reply with quote

If I'm understanding this right, I think the OP wants to use JESINTERFACELEVEL=2 to get the data in this format:

Code:

4.13.2.2 DIR command with JESINTERFACELEVEL=2


The following is a sample of the DIR command with JESINTERFACELEVEL=2:




    __________________________________________________________________________________
   |                                                                                  |
   |      dir                                                                         |
   |     EZA1701I >>> PORT 127,0,0,1,4,5                                              |
   |     200 Port request OK.                                                         |
   |     EZA1701I >>> LIST                                                            |
   |     125 List started OK for JESJOBNAME=USER1*, JESSTATUS=ALL and   JESOWNER=USER |
   |     EZA2284I JOBNAME JOBID OWNER STATUS CLASS                                    |
   |     EZA2284I USER1A  JOB00083 USER1 OUTPUT A ABEND=806 3 spool files             |
   |     EZA2284I USER1   JOB00070 USER1 OUTPUT A RC=000 5 spool files                |
   |     EZA2284I USER1J  JOB00082 USER1 OUTPUT A (JCL error) 3 spool files           |
   |     EZA2284I USER1   JOB00054 USER1 OUTPUT A RC=0000 5 spool files               |
   |     EZA2284I USER1D  JOB00029 USER1 OUTPUT A RC=0000 5 spool files               |
   |     EZA2284I USER1C  JOB00028 USER1 OUTPUT A RC=0000 5 spool files               |
   |     EZA2284I USER1B  JOB00027 USER1 OUTPUT A RC=0000 5 spool files               |
   |     EZA2284I USER1   TSU00024 USER1 ACTIVE TSU                                   |
   |     EZA2284I USER1W  JOB00081 USER1 INPUT A -DUP-                                |
   |     EZA2284I USER1p  JOB00093 USER1 INPUT A -HELD-                               |
   |     250-JESENTRYLIMIT of 10 reached. Additional entries not displayed            |
   |     250 List completed successfully.                                             |
   |     EZA1460I Command:                                                            |
   |      dir tsu00024                                                                |
   |     EZA1701I >>> PORT 127,0,0,1,4,6                                              |
   |     200 Port request OK.                                                         |
   |     EZA1701I >>> LIST tsu00024                                                   |
   |     125 List started OK for JESJOBNAME=USER1*, JESSTATUS=ALL and   JESOWNER=USER |
   |     EZA2284I JOBNAME  JOBID    OWNER STATUS CLASS                                |
   |     EZA2284I USER1    TSU00024 USER1 ACTIVE TSU                                  |
   |              --------                                                            |
   |     EZA2284I STEPNAME ++++++++ PROCNAME     OS390R5                              |
   |     EZA2284I CPUTIME     0.503 ELAPSED TIME   3853.718                           |
   |     250 List completed successfully.                                             |
   |     EZA1460I Command:                                                            |
   |      dir job54                                                                   |
   |     EZA1701I >>> PORT 127,0,0,1,4,7                                              |
   |     200 Port request OK.                                                         |
   |     EZA1701I >>> LIST job54                                                      |
   |     125 List started OK for JESJOBNAME=USER1*, JESSTATUS=ALL and   JESOWNER=USER |
   |     EZA2284I JOBNAME  JOBID    OWNER STATUS CLASS                                |
   |     EZA2284I USER1    JOB00054 USER1 OUTPUT A           RC=000                   |
   |     EZA2284I --------                                                            |
   |     EZA2284I          ID  STEPNAME PROCSTEP C DDNAME   BYTE-COUNT                |
   |     EZA2284I          001 JESE              H JESMSGLG      1200                 |
   |     EZA2284I          002 JESE              H JESJCL         526                 |
   |     EZA2284I          003 JESE              H JESYSMSG      1255                 |
   |     EZA2284I          004 STEP57            H SYSUT2         741                 |
   |     EZA2284I          005 STEP57            A SYSPRINT       209                 |
   |     EZA2284I 5 spool files                                                       |
   |     250 List completed successfully.                                             |
   |     EZA1460I Command:                                                            |
   |                                                                                  |
   |__________________________________________________________________________________|




For a list of jobs these fields are displayed:

JOBNAME
The job name.

JOBID
The job ID, assigned by JES. This 8-character job ID, consisting of the word JOB followed by a 5-digit number or the letter J followed by a 7-digit number, is assigned by JES to identify your job.

OWNER
The user ID that owns the job.

STATUS
The current job status. The status is one of the following:

INPUT
The job was received, but not run yet.

HELD
The JCL specified that the job is to be put on hold.

ACTIVE
The job is running.

OUTPUT
The job has finished and has output to be printed or retrieved. For each OUTPUT job, there are spool files that consist of JCL messages, JES messages, initiator and terminator messages, and SYSOUT. For jobs with a status of OUTPUT, the number of spool files for each job is specified in the DIR display output.


CLASS
The job class.

These fields are followed by information about the job termination (if it has been reached) or clarification of the status field. This information might include an ABEND code, an indication of a JCL error, an indication that the job is held as a DUP, or the maximum return code for the job in a 4-digit decimal field.


For a TSO user the following additional fields are displayed:

STEPNAME
The procstepname for the logon procedure.

PROCNAME
The logon procedure.

CPUTIME
The total CPU seconds used.

ELAPSED TIME
The total elapsed time in seconds.


For an individual job, these additional fields are displayed for each spool file:

ID
The ID for the spool file being listed.

STEPNAME
The job step that generated the spool file.

PROCSTEP
The procedure stepname (if any) that generated the spool file.

C
The SYSOUT class of the spool file.

DDNAME
The DDNAME associated with this spool file.

BYTE-COUNT
The total number of bytes in the spool file.


as documented here in the z/OS V1R10.0 Comm Svr: IP User's Guide and Commands manual.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 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