I'm running batch Java on an IBM mainframe under JZOS. The job creates 0 - 6 ".txt" outputs depending upon what it finds in the database. Then, I need to convert those files from Unix to MVS (ebcdic) and I'm using OCOPY command running under IKJEFT01. However, when a particular output was not created, I get a JCL error and the job ends. I'd like to check for the presence or absence of each file name and set a condition code to control whether the IKJEFT01 steps are executed, but don't know what to use that will access the Unix file pathnames.
I have resolved this issue by writing a COBOL program to check the converted MVS files and set return codes to control the execution of subsequent JCL steps. The completed job is now undergoing user acceptance testing. Perhaps it sounds like a kludge, but it does work and I'm happy to share this solution.
How to check for existence of Unix System Services files
2.2k Views Asked by Mike GH At
1
There are 1 best solutions below
Related Questions in UNIX
- passing text with \n as one argument in shell
- C std library don't appear to be linked in object file
- How to split a directory into parts without compressing or archiving?
- Momentjs get current GMT unix time
- Timing packets on a traffic server
- man pages for c variable types
- Blocking in pthread_join()
- PWX-00001 Error opening repository "dtlmsg.txt". RCs = 268/150/2
- Unix c program to calculate pi using threads
- How to perform parallel processes for different groups in a folder?
- Set aliases globally for all users
- wmic csproduct get UUID equivalent for Unix and Mac?
- Send alert for 80% threshold comparing two values from Disk partition
- Unix - Tail Utility would open the file or not
- Redirect Outward of unix os commands to html page
Related Questions in ZOS
- Site code to enable UTF-8 to EBCDIC encoding
- Getting output queue via FTP of a Mainframe (zOS)
- encryption/decryption by REXX
- Authorization required to install jzos batch launcher?
- Connecting ibm_db2 functions (php) on Ubuntu 14.04 to DB2 for z/OS
- How to debug JCL
- SQL differences for DB2 versions
- DB2 Z/OS Insert/Select Performance
- z/OS TSO STACK MACRO to specify alternate DDnames
- Error while creation of queue in WebSphere MQ for z/OS
- UNIDENTIFIED OPERATION FIELD Error in JCL
- How to export VSAM file content to viewable in windows?
- Convert Java Timestamp in TOD Format (Time of Day) on z/os
- What is the meaning of the first byte of each record set when downloading a v(b)-file from z/OS over FTP using "TYPE E" and "MODE B"
- Determine compile options from load module - IBM Enterprise COBOL
Related Questions in JCL
- JCL IF statement on multiple lines
- Submit another JCL as a step from main JCL based on RC of the previous step {via Internal Reader}
- Procedure was expanded as instream procedure definition
- How to debug JCL
- How to convert IBM file to hexadecimal using DFSORT?
- creating a vsam file using jcl
- UNIDENTIFIED OPERATION FIELD Error in JCL
- Setting PATH in IEBGENER from file
- Generation Data Groups (GDG)
- How to do Delete/Define with using IDCAMS using batch JCL (z/VSE)
- Easytrieve A010 invalid file reference
- Lexing/Parsing "here" documents
- XML handling in REXX or JCL
- are //AMSDUMP DD and //SYSPRINT DD SYSOUT=A statements same?
- RECFM =FBA when i specifed RECFM=FB
Related Questions in MVS
- Reading EBCDIC variable files with comp-3 without COBOL on MVS?
- DB2 for z/OS SQL: OVERRIDING USER VALUE not permitted
- z/OS JCL command /*VS command fails when issued in a proc
- Does anyone have a working Jenkins agent configuration for git clone on z/OS R2.4
- Is there a way to check existence of file in MVS before attempting copy to Unix server
- Moving DataBase from Microsoft SQL folder to App_Data folder (appseting.json)
- How to cancel a JCL job(Mainframe) in SDSF???(OZA1) error
- How can I obtain memory usage information using zos assembler
- IBM Window Services (DWS) csrevw function on MVS
- MVS JES2 purge job with IEFSSREQ macro
- What is the most efficient way to read and set file modification timestamps for MVS data sets and PDS members?
- zosftplib submit_wait_job(jcl) function does not receive JES output
- What are the effects of PR instruction on empty stack
- Cobol v6.2 NUMCHECK option compatibility
- Run step when previous JCL step did not find file
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The simplest way to do this in JCL is to use BPXBATCH as follows:
If the file exists, the step ends with CC 0 and the
IFsucceeds. If the file does not exist, you get a non-zero CC (256, I believe), and theIFfails.Since there is no
//STDOUT DDstatement, there's no output written to JES.The only drawback is that it is another job step, and if you have a lot of procs (like a compile/assemble job), you can run into the 255 step limit.