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
 

 

Output mismatch while running a exec thriugh jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Sat Jul 27, 2013 3:47 pm    Post subject: Output mismatch while running a exec thriugh jcl
Reply with quote

Hi all ,
I am having a terible time trying to understand the diffrent out put i am getting while running an exec through jcl and when runing it directly by giving "exec" command . My codes requirments
Read a pds .
find its memebers .
List out steps that have a particular string
get the last modified date of the memers

i am getting all the things right . the last requirment of getting the last modified date is showing diffrent result when i am running the job using a "RUNJCL" and that when running it using "EXEC" command .Below is my code

Code:
/*REXX*/                                                                00010000
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"                                 00010200
                                                                        00020000
PDSNAME="'TEST.PDS'"                                       00030000
SRCHSTRING="PGM=FOCUS"                                                  00040000
COMMENT = "//*"                                                         00050000
/**----------------------------------------------------------------**/  00060000
CALL OUTTRAP "MBRS."                                                    00070000
/**----------------------------------------------------------------**/  00080000
"LISTD" PDSNAME "MEMBERS"                                               00090000
/**----------------------------------------------------------------**/  00100000
CALL OUTTRAP "OFF"                                                      00110000
/**----------------------------------------------------------------**/  00120000
/**IDENTIFY POINT AT WHICH HE MEMEBR LIST STARTS                   **/  00130000
/**THIS WIOLL BE THE VALUE IN NDX                                  **/  00140000
/**----------------------------------------------------------------**/  00150000
/**----------------------------------------------------------------**/  00160000
DO NDX=1 TO MBRS.0                                                      00170000
    IF MBRS.NDX = "--MEMBERS--" THEN LEAVE                              00180000
END                                                                     00190000
NDX=NDX+1                                                               00200000
/**-----------------------------------------------------------------**/ 00210000
/**CONVERT THE PDSNAME TO MAKE SURE IT IS FULLY QUALIFIED           **/ 00220000
/**THIS ADDS THE HIGH LEVEL QUALIFIER,IF NEEDED                     **/ 00230000
/**-----------------------------------------------------------------**/ 00240000
CALL LISTDSI PDSNAME                                                    00250000
F=1                                                                     00260000
say "MEMNAME: ³³STEPNAME:³³MODIFIED:  "                                 00270000
FULLNAME=SYSDSNAME                                                      00280000
 DO CURMBR = NDX TO MBRS.0                                              00290000
    PARSE VALUE MBRS.CURMBR WITH MEMNAME                                00300000
    MEMNAME=STRIP(MEMNAME)                                              00310000
       RECID=1                                                          00320000
       "ALLOC F(XXIN) DS('"fullname"("MEMNAME")') SHR REUSE"            00330000
       "EXECIO * DISKRU XXIN (FINIS STEM IN."                           00340000
        FOUND =0                                                        00350000
        S =0                                                            00360000
       DO RECID=1 to IN.0                                               00370000
         IF POS(SRCHSTRING,IN.RECID) > 0 THEN                           00380000
           IF  POS(COMMENT,IN.RECID) ==1  then                          00390000
            nop                                                         00400000
           ELSE                                                         00410000
            DO                                                          00420000
             STEPNAME =SUBSTR(IN.RECID,3,8)                             00430000
             ZLMDATE=""                                                 00440000
 ADDRESS "ISPEXEC"                                                      00441000
 ADDRESS ISPEXEC "LMINIT DATAID(dataid) DATASET('"FULLNAME"') ENQ(SHR)" 00443000
 ADDRESS ISPEXEC "LMOPEN  DATAID("dataid") OPTION(INPUT)"               00444000
 ADDRESS ISPEXEC "LMMFIND DATAID("dataid") MEMBER("MEMNAME") STATS(YES)"00450000
 ADDRESS ISPEXEC "LMFREE  DATAID("dataid")"                             00460000
                                                                        00481000
    PARSE VAR ZLMDATE YY 3 4 MM 6 7 DD                                  00490000
    MDATE=MM"/"DD"/"YY                                                  00500000
 say JUSTIFY(MEMNAME,9)³³JUSTIFY(STEPNAME,9)³³JUSTIFY(MDATE,11)         00520000
 END                                                                    00530000
END                                                                     00540000
END                                                                     00550000



The output when running the code using EXEC command is correct and what i require .Its as mentioned below
MEMNAME: ||STEPNAME:||MODIFIED:
S10358AA STEP01 04/25/13

But when i run it using jcl it gives this in sysout
2 *-* ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
+++ RC(-3) +++
MEMNAME: ||STEPNAME:||MODIFIED:
47 *-* ADDRESS ISPEXEC "LMINIT DATAID(dataid) DATASET('"FULLNAME"') ENQ
+++ RC(-3) +++
48 *-* ADDRESS ISPEXEC "LMOPEN DATAID("dataid") OPTION(INPUT)"
+++ RC(-3) +++
49 *-* ADDRESS ISPEXEC "LMMFIND DATAID("dataid") MEMBER("MEMNAME") STAT
+++ RC(-3) +++
50 *-* ADDRESS ISPEXEC "LMFREE DATAID("dataid")"
+++ RC(-3) +++

Can somebody help me with this . I need to get the output in the spool sysout .
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Sat Jul 27, 2013 5:57 pm    Post subject:
Reply with quote

You appear to be running background TSO, not background ISPF; this is the cause of RC=-3 whenever you invoke an ISPF service. Ensure that all the ISPF libraries are allocated in the JCL, and invoke your exec by specifying ISPSTART(exec-name) in SYSTSIN.
Back to top
View user's profile Send private message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Mon Jul 29, 2013 11:21 am    Post subject: Reply to: Output mismatch while running a exec thriugh jcl
Reply with quote

Thanks a lot Akatsukami
Learned a new thing today icon_smile.gif
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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