Sponsored Content
Top Forums Shell Programming and Scripting Typeset -i in MVS (Mainframe system) Post 302748809 by ppatra on Thursday 27th of December 2012 02:20:35 AM
Old 12-27-2012
Typeset -i in MVS (Mainframe system)

Hi,

I have one job that runs daily and creates daily files. At the end I compare the today's file with previous day's file. And if today's file size is greater or equal to previous day's file, then it is ok, else I need to through error.
I have following piece of code:
Code:
typeset -i SIZE_CURRDATE
typeset -i SIZE_PREVDATE
DAY=`echo $RUN_DATE | cut -c 5-6`
if [ $DAY -ne "01" ] ; then
SIZE_CURRDATE=`m_ls -l mfile:file_name |  awk '{ print $5 }' | sed 's/,//g'`
SIZE_PREVDATE=`m_ls -l mfile:file_name |  awk '{ print $5 }' | sed 's/,//g'`

echo "PREV_DATE : " $PREV_DATE
echo "SIZE_CURRDATE : " $SIZE_CURRDATE
echo "SIZE_PREVDATE : " $SIZE_PREVDATE
if [ $SIZE_CURRDATE -le $SIZE_PREVDATE ] ; then
 echo "ERROR : The output file is of zero length."
 exit -1
else
 echo "OK"
fi
fi

This runs fine in AIX UNIX. But it is giving arithmatic overflow error in MVS USS system when file size is more or equal to 10 digits.
Could you please help me to solve this?
 

8 More Discussions You Might Find Interesting

1. Solaris

ftp flat file from MVS(OS390) to Solaris

I've been working on this for a while and decided to see if anyone else here had this same issue. I'm trying to ftp a file from a mainframe (OS390) to Solaris. Obviously this is easily done, however the file is somehow being stripped of data in comparison to the way we transfer the file via a... (5 Replies)
Discussion started by: douknownam
5 Replies

2. Shell Programming and Scripting

SFTP to MVS system

Hi All, I have written a script that transfers(FTP) files from Unix system to MVS system. Below is the code for it. ftp -inv $HOST<<ftp_test quote site LRECL=200 quote site BLKSIZE=28000 mput SOURCE DEST ftp_test Here I need the help, if the above code can get... (3 Replies)
Discussion started by: rinku11
3 Replies

3. Shell Programming and Scripting

FTP files to target Mainframe system

Hi Experts... Greetings for the day..! I just want to FTP the files to mainframe system.. my code is not working..and also i need to put the files in a particular directory in a specific naming format... ftp -i -n ${HOST_NAME} << END_FTP user ${USER_NAME} ${PASSWORD} put ${FILE_NAME}... (3 Replies)
Discussion started by: spkandy
3 Replies

4. Emergency UNIX and Linux Support

SFTP issue when connecting from MVS to AIX

Dear all, I was given the ID_DSA.pub by an MVS user, which I placed in the appropriate user's authorized_keys file. When the user tris to SFTP from their side to the AIX box, the following error is got: error: debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY ... (6 Replies)
Discussion started by: ggayathri
6 Replies

5. AIX

MVS DB2 Connection from AIX

Hi, I want to try to connect to a DB2 (MVS) database from an AIX, through my c++ custom program. Is anybody who knows how can I do this? Which libraries should I use? Should I have a DB2 connect installed on my AIX? Thank you in advance. (3 Replies)
Discussion started by: develo
3 Replies

6. Shell Programming and Scripting

Sending File from Unix to MVS

Hi, I am trying to send a txt file via FTP to the Mainframe or MVS. the file gets sent to the MVS but the user name gets appended to the file name. For eg if i am sending test.txt, in the mainframe it lands as username.test.txt. I tried putting the filename inside single quotes but I get an... (3 Replies)
Discussion started by: naveensraj
3 Replies

7. UNIX for Advanced & Expert Users

MVS compression that unix can uncompress

Dear all, I have been given the opportunity at the last minute to help on a project. There is a need to move some very large files from an MVS machine to an AIX one. The servers are remote with (I think) a 2Meg network pipe between them. The people on the project have been moving small... (1 Reply)
Discussion started by: rbatte1
1 Replies

8. UNIX for Beginners Questions & Answers

Migrating jobs from COBOL Mainframe system to UNIX system

In a nutshell requirement is to migrate the system from mainframe environment to UNIX environment (MF cobol would be used I guess). I have not much of idea in this field. I need to do some investigation on following points - - Ease of conversion - Known Data compatibility issue - Issue in... (9 Replies)
Discussion started by: Tjsureboy4me
9 Replies
SA2(8)								Linux User's Manual							    SA2(8)

NAME
sa2 - Write a daily report in the /var/log/sysstat directory. SYNOPSIS
/usr/lib/sysstat/sa2 DESCRIPTION
The sa2 command is a shell procedure variant of the sar command which writes a daily report in the /var/log/sysstat/sardd file, where the dd parameter indicates the current day. The sa2 command handles all of the flags and parameters of the sar command. The sa2 command is designed to be started automatically by the cron command. EXAMPLES
To run the sa2 command daily, place the following entry in your root or adm crontab file: 5 19 * * 1-5 /usr/lib/sysstat/sa2 -A & This will generate a daily report called /var/log/sysstat/sardd It will also remove reports more than one week old. Debian note The Debian sysstat package has already placed such an entry in your system crontab. Please refer to the /usr/share/doc/sys- stat/README.Debian file for details. FILES
/var/log/sysstat/sardd Indicate the daily report file, where the dd parameter is a number representing the day of the month. AUTHOR
Sebastien Godard (sysstat <at> orange.fr) SEE ALSO
sar(1), sadc(8), sa1(8), sadf(1) http://pagesperso-orange.fr/sebastien.godard/ Linux AUGUST 2010 SA2(8)
All times are GMT -4. The time now is 06:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy