SSH command for new GDG genration


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SSH command for new GDG genration
# 1  
Old 03-28-2009
SSH command for new GDG genration

Hi,

I am trying to SSH to a GDG file from UNIX to Mainframe and it is not transferring it and giving error.
I gave the following command and as can be seen I am using the relative number i.e +1 here:
ssh -v username@remote.host "mv -P RECFM=FB,LRECL=150 /homedir/username/test.dat \"//'HLQ.XXXX.DATA(+1)'\" "

Error:
Code:
mv: FSUMF157 //'HLQ.XXXX.DATA' is an existing sequential data set, no member allowed

But when I try to use absolute number it is working i.e G0001V00 here:
ssh -v username@remote.host "mv -P RECFM=FB,LRECL=150 /homedir/username/test.dat \"//'HLQ.XXXX.DATA.G0001V00'\" "

The GDG index (base) is already built at the mainframe side.
Is there a way I can do SSH using relative number? The hard-coding will mean everytime I have to be aware of the last number and increment it manually.
The version of SSH is:
OpenSSH_4.3p2, OpenSSL 0.9.7d 17 Mar 2004

Thanks.

Last edited by Yogesh Sawant; 03-29-2009 at 02:30 PM.. Reason: added code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. Shell Programming and Scripting

ssh command help

I am running a ssh command like this : ssh abc1234 '. /opt/dba/oraadmin/tools/oraenv.sh -S tstd1; export PATH=$PATH:$ORACLE_HOME/bin;echo "select count(*) from (select b.username from dba_sys_privs a,dba_users b where a.privilege='CREATE SESSION' and a.grantee=b.username union select b.username... (4 Replies)
Discussion started by: talashil
4 Replies

3. UNIX for Advanced & Expert Users

Use of GDG files in UNIX using MBM (Mainframe Batch Manager).

Use of GDG files in UNIX using MBM (Mainframe Batch Manager). Is any one working with GDG files in UNIX (AIX) using the MBM wrapper? I need some help to refer the GDG files in the scripts. (0 Replies)
Discussion started by: deeceeds
0 Replies

4. 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

5. Shell Programming and Scripting

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... (3 Replies)
Discussion started by: mavesum
3 Replies

6. Shell Programming and Scripting

Regarding Random Number Genration

HI please help me in solving this issue. I have a shell script which consists of ten statemnts ( i mean 10 executable statments)...........and if i run that script the 10 statmenst will execute continously ............ But now my probelm is i have to write another script --> to... (0 Replies)
Discussion started by: lalitka
0 Replies

7. UNIX for Dummies Questions & Answers

Script for FTPing files to mainframe GDG

Hi, Request Unix gurus to kindly share a script which FTPs multiple files from Unix to a Mainframe GDG. The script should check for oldest file named as 'abc*.txt' in a directory '/dir/child'. FTP that file to MF, then remove the file from unix and then look for the next oldest file to be... (1 Reply)
Discussion started by: dsrookie
1 Replies

8. UNIX for Dummies Questions & Answers

GDG in AIX?

Does anyone know how to emulate Mainframe's GDG (Generation Data Group) in AIX? (0 Replies)
Discussion started by: vidhya
0 Replies

9. AIX

GDG's on AIX

Hi, Does anyone have a solution they can share that will emulate Mainframe Generation Data Groups (GDG) on AIX? Thank You in Advance for Your Help, Lou (0 Replies)
Discussion started by: LouPelagalli
0 Replies

10. UNIX for Dummies Questions & Answers

File Versions (GDG)

Hi There, This is more a question for the 'mainframers' of old. I need a control structure (AIX) very similar to "GDG" files (Generation data group) as found on OS/390 to control versions of files. Specific files have specific needs, some need to be kept for 5 versions, some for 30 and... (0 Replies)
Discussion started by: Bizcut
0 Replies
Login or Register to Ask a Question