Sponsored Content
Top Forums Shell Programming and Scripting To check if the latest version of given GDG base has data Post 302268697 by mavesum on Tuesday 16th of December 2008 06:19:37 AM
Old 12-16-2008
Hi All ,

I have come up with this script which does the thngs required but in both the cases i.e., whether the file PRODGA.GL.DTLTEST_00 has data or not it gives file empty error . The PARM passed from JCL is TEST

Code:
 
#!/bin/ksh

var1="PRODGA.GL.DTL$PARM"  
echo $var1                           //  it shows PRODGA.GL.DTLTEST
var2='_00'
var3=$var1$var2
echo $var3                           // it shows PRODGA.GL.DTLTEST_00
if [ ! -s $var3 ];then
  echo "**** ERROR - FILE EMPTY ****"
  exit 4
fi;
exit

now even if ls -l PRODGA.GL.DTLTEST_00 :

Code:
ls -l PRODGA.GL.DTLTEST_00
-rw-rw-r--   1 sd138110 btpso          2 Dec 16 04:03 PRODGA.GL.DTLTEST_00



but this script shws error - file empty


Could anyone please let me know where i am missing .
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Downloading vs buying latest version of os

I am currently taking a Unix programming class in school, I want ot know which is more efficient and quicker, downloading the os or buying the os (4 Replies)
Discussion started by: lavonte
4 Replies

2. UNIX for Dummies Questions & Answers

What is the latest version of Unix?

I want to buy it (2 Replies)
Discussion started by: LANSTARR.COM
2 Replies

3. Shell Programming and Scripting

Latest version of a file across the servers ..

:o How do I confirm that the script on one server is latest compare to other servers? Is there any script which can tell me the latest version of a file across the servers? Thanks, (2 Replies)
Discussion started by: Sandy
2 Replies

4. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies

5. UNIX for Dummies Questions & Answers

To check if the latest version of given GDG base has data

Hi All , I am trying to run a shell script through a JCL . The requirement is I have a gdg base name and I need to create a script that will just check if the latest version of that gdg has data or not . If it doesnt have data RC 4 need to be returned . One more thing which is bothering me is i... (1 Reply)
Discussion started by: mavesum
1 Replies

6. BSD

latest version of bsd

Any body there ? What is latest BSD version ? (4 Replies)
Discussion started by: chilaka
4 Replies

7. AIX

Latest firmware version for P770

Dears i have a power7 P770 working in AIX 5.3 TL 11 with frimware AM730_066 is the AM730_066 frimware the latest one or not ? (6 Replies)
Discussion started by: thecobra151
6 Replies

8. Shell Programming and Scripting

Combine data from two files base on uniq data

File 1 ID Name Po1 Po2 DD134 DD134_4A_1 NN-1 L_0_1 DD134 DD134_4B_1 NN-2 L_1_1 DD134 DD134_4C_1 NN-3 L_2_1 DD142 DD142_4A_1 NN-1 L_0_1 DD142 DD142_4B_1 NN-2 L_1_1 DD142 DD142_4C_1 NN-3 L_2_1 DD142 DD142_3A_1 NN-41 L_3_1 DD142 DD142_3A_1 NN-42 L_3_2 File 2 ( Combination of... (1 Reply)
Discussion started by: pareshkp
1 Replies

9. Ubuntu

How can i get libatlas-base-dev version?

Hello, Please i have installed libatlas-base-dev on my Ubuntu Trusty Tahr: sudo apt-get install libatlas-base-dev Which command can i use to get the version of the library installed ? Thanks a lot. Best Regards. (2 Replies)
Discussion started by: chercheur111
2 Replies

10. Solaris

Solaris 11 SRU latest version

Hi During a host review session I was told to check if the engineers have been updating Solaris 11 OS regularly by verifying the SRU version of the system. However i was having no luck in finding the latest SRU version number in oracle website for hours. I wonder did anyone here know where i... (4 Replies)
Discussion started by: kaze
4 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 03:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy