DevOps Automation

 View Only

Need Technical Support for Running Python Program in Batch on IBM z/OS 3.1

  • 1.  Need Technical Support for Running Python Program in Batch on IBM z/OS 3.1

    Posted 2 days ago
    I am new to the Python 3.12 and ZOAU 3.1 environments and currently experimenting with it on IBM zOS 3.1.  
    The Python code executes successfully when run from the OMVS command line.
    However, when I attempt to run the same code in batch mode, it does not work as expected and has become a showstopper.
    I would greatly appreciate any guidance or suggestions on how to resolve this issue. 
    If anyone has experienced a similar problem or has insights into what might be causing this 
    error, your help would be invaluable.  Below is the batch execution along with ENV parms.
    Thanks Ulises.

    16.00.04 JOB01354 ---- WEDNESDAY, 31 JUL 2024 ----                                                                            
    16.00.04 JOB01354  IRR010I  USERID UAL      IS ASSIGNED TO THIS JOB.                                                          
    16.00.04 JOB01354  ICH70001I UAL      LAST ACCESS AT 15:45:56 ON WEDNESDAY, JULY 31, 2024                                     
    16.00.04 JOB01354  $HASP373 UALZ     STARTED - INIT 3    - CLASS N        - SYS SYST                                          
    16.00.04 JOB01354  IEF403I UALZ - STARTED - TIME=16.00.04                                                                     
    16.00.07 JOB01354  -                                         --TIMINGS (MINS.)--            ----PAGING COUNTS---              
    16.00.07 JOB01354  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP    CPU    SRB  CLOCK   SERV  PG   PAGE   SWAP    VIO SWAPS STEPNO 
    16.00.07 JOB01354  -UALZ              STEP1       09  22984    .00    .00    .04   6228   0      0      0      0     0     1  
    16.00.07 JOB01354  IEF404I UALZ - ENDED - TIME=16.00.07                                                                       
    16.00.07 JOB01354  -UALZ     ENDED.  NAME-Ulises Lopez         TOTAL CPU TIME=   .00  TOTAL ELAPSED TIME=   .04    
    16.00.07 JOB01354  $HASP395 UALZ     ENDED - RC=0009                                                                          
    ------ JES2 JOB STATISTICS ------                                                                                             
      31 JUL 2024 JOB EXECUTION DATE                                                                                              
               33 CARDS READ                                                                                                      
               62 SYSOUT PRINT RECORDS                                                                                            
                0 SYSOUT PUNCH RECORDS                                                                                            
                8 SYSOUT SPOOL KBYTES                                                                                             
             0.04 MINUTES EXECUTION TIME                                                                                          
            1 //UALZ     JOB (TXXX,UL),'Ulises Lopez',NOTIFY=UAL,CLASS=N,          JOB01354                                    
              //             MSGCLASS=X,REGION=8M                                                                                 
              //* 

            2 // SET PYZ='PGM /u/ual/pyz/usr/lpp/IBM/cyp/v3r12/pyz/bin/python3'                                        
            3 // SET APATH='/u/ual/pyz/z/mysrc'                                                                        
            4 // SET PGM='ual1.py'                                                                                     
            5 //STEP1    EXEC PGM=BPXBATSL,PARM='&PYZ &APATH/&PGM',REGION=8M                                           
              IEFC653I SUBSTITUTION JCL - PGM=BPXBATSL,PARM='PGM /u/ual/pyz/usr/lpp/IBM/cyp/v3r12/pyz/bin/python3      
              /u/ual/pyz/z/mysrc/ual1.py',REGION=8M                                                                    
            6 //SYSPRINT DD SYSOUT=*                                                                                   
            7 //STDERR   DD SYSOUT=*                                                                                   
            8 //STDOUT   DD SYSOUT=*                                                                                   
            9 //STDENV   DD *                                                                                          
    ICH70001I UAL      LAST ACCESS AT 15:45:56 ON WEDNESDAY, JULY 31, 2024                                             
    IEFA111I UALZ IS USING THE FOLLOWING JOB RELATED SETTINGS:                                                         
             SWA=BELOW,TIOT SIZE=32K,DSENQSHR=DISALLOW,GDGBIAS=JOB                                                     
    IEF236I ALLOC. FOR UALZ STEP1                                                                                      
    IEF237I JES2 ALLOCATED TO SYSPRINT                                                                                 
    IEF237I JES2 ALLOCATED TO STDERR                                                                                   
    IEF237I JES2 ALLOCATED TO STDOUT                                                                                   
    IEF237I JES2 ALLOCATED TO STDENV                                                                                   
    IEF142I UALZ STEP1 - STEP WAS EXECUTED - COND CODE 0009                                                            
    IEF285I   UAL.UALZ.JOB01354.D0000102.?                 SYSOUT                                                      
    IEF285I   UAL.UALZ.JOB01354.D0000103.?                 SYSOUT                                                      
    IEF285I   UAL.UALZ.JOB01354.D0000104.?                 SYSOUT                                                      
    IEF285I   UAL.UALZ.JOB01354.D0000101.?                 SYSIN                                                       
    IEF373I STEP/STEP1   /START 2024213.1600                                                                           
    IEF032I STEP/STEP1   /STOP  2024213.1600                                                                           

            CPU:     0 HR  00 MIN  00.38 SEC    SRB:     0 HR  00 MIN  00.00 SEC   
            VIRT:   172K  SYS:   260K  EXT:    18052K  SYS:    12732K              
            ATB- REAL:                  9020K  SLOTS:                     0K       
                 VIRT- ALLOC:      30M SHRD:       0M                              
    IEF375I  JOB/UALZ    /START 2024213.1600                                       
    IEF033I  JOB/UALZ    /STOP  2024213.1600                                       
            CPU:     0 HR  00 MIN  00.38 SEC    SRB:     0 HR  00 MIN  00.00 SEC    

    CEE3501S The module zoautil.so was not found.
             From compile unit _PyImport_FindSharedFuncptr at entry point _PyImport_FindSharedFuncptr at compile unit offset +0000000000000102 at entry offset +0000000000000102 at address 0000000012C7D0E2.

    ENV settings follow:

    export PYZ_HOME=/u/ual/pyz/usr/lpp/IBM/cyp/v3r12/pyz
    export PATH=$PATH:$PYZ_HOME/bin
    export LIBPATH=$LIBPATH:$PYZ_HOME/lib
    export _BPXK_AUTOCVT='ON'

    export _CEE_RUNOPTS='FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'
    export _TAB_REDIR_ERR=txt
    export _TAB_REDIR_IN=txt
    export _TAB_REDIR_OUT=txt 
    export CC=/usr/lpp/IBM/oelcpp/v2r0/clang
    export CXX=/usr/IBM/cnw/v1r1/openx1/bin/ibm-clang
    export LDSHARED=/bin/xlc 
    export _TAG_REDIR_ERR=txt
    export _TAG_REDIR_IN=txt
    export _TAG_REDIR_OUT=txt 
    export ZOAU_ROOT=/u/ual/pyz/usr/lpp/IBM/zoau/v1r3
    export PATH=$PATH:$ZOAU_ROOT/bin
    export LIBPATH=$ZOAU_ROOT/lib:$LIBPATH
    export MANPATH=$MANPATH:$ZOAU_ROOT/docs/%L
    export TMPHLQ=TST
    export CONSBUFPGNUM=256
    export PYTHONPATH=$PYTHONPATH:$ZOAU_ROOT/lib/3.12
    export LD_LIBRARY_PATH=$ZOAU_ROOT/lib:$LD_LIBRARY_PATH



    ------------------------------
    Ulises Lopez
    ------------------------------