MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

copy command for VB files in REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 46
Topics: 29

PostPosted: Mon Aug 16, 2004 3:50 am    Post subject: copy command for VB files in REXX Reply with quote

Hi,
I'm using the following TSO command to copy one data set to another
with in a Rexx Program.


Address "TSO" "COPY" pdstext temp_pds

where pdstext is the source and temp_pds is the destination

When both are FB files, its working fine. when I try to execute the same with source as VB and destination also VB(variable length), I'm encoutering the following error...


COPY TERMINATED, RENUMBERING ERROR+
RECORD LENGTH SHORTER THAN LINE NUMBER FIELD LENGTH

I'm not able to solve the p'lem even if I use RENUM option in COPY command.

Please suggest the solution..


Thanks and Regards,
Kris
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Aug 16, 2004 10:28 am    Post subject: Reply with quote

Kris, since "COPY" is not a standard TSO command, it may be difficult for the members of this forum to assist.

Have you considered using another method? REPRO is the command usually invoked to copy files, or, alternatively, calling the IEBGENER or SORT programs also works well.
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Mon Aug 16, 2004 12:31 pm    Post subject: Reply with quote

See if TSO HELP COPY works for you. Maybe it will give you some more info?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Thu Aug 19, 2004 10:23 am    Post subject: Reply with quote

superk said:
Quote:

Kris, since "COPY" is not a standard TSO command, it may be difficult for the members of this forum to assist.


Our MVS people say it *is* a standard TSO command; it is part of basic TSO and not specially installed or seperately supplied.

Does it help if you use the RECFM parameter? Or the NONUM parameter?
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Aug 19, 2004 10:41 am    Post subject: Reply with quote

Mike, this discussion is from bre's board what I am using for the basis of my statement:

I have the same issue here when attempting to enter the command TSO COPY. There is also no entry for COPY in TSO HELP COPY.

Edit By Modearator: Removed the link
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Aug 19, 2004 12:00 pm    Post subject: Reply with quote

Mike

Please ask your MVS people to read this TSO command reference, and let me know where this command is documented ?

I'll be happy to use it in my TSO. Rolling Eyes

By the way: Take a look at this DFDSS book.

Thanks -

Ofer
________
Harley-Davidson XL883


Last edited by ofer71 on Sat Feb 05, 2011 11:19 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Aug 19, 2004 12:37 pm    Post subject: Reply with quote

Mike,

I agree with superk , that COPY is not a standard TSO command. It is a clist. Here is the code
Code:

PROC 2 INDATASET OUTDATASET +                                         
  RENUM() NUM() NONUM  NUM2() LRECL() BLOCK() +                       
  RECFM() ASCII LIST                                                 
IF &LIST EQ LIST THEN +                                               
  CONTROL LIST SYMLIST CONLIST                                       
/*         */                                                         
SET BLANK EQ &STR( )                                                 
IF &RENUM NE &BLANK THEN SET ©STR EQ &STR(RENUM(&RENUM))         
IF &NUM NE &BLANK THEN SET ©STR EQ &STR(©STR NUM(&NUM))       
ELSE SET ©STR EQ &STR(©STR NONUM)                             
IF &NUM2 NE &BLANK THEN SET ©STR EQ &STR(©STR NUM2(&NUM2))   
IF &LRECL NE &BLANK THEN SET ©STR EQ &STR(©STR LRECL(&LRECL))
IF &BLOCK NE &BLANK THEN SET ©STR EQ &STR(©STR BLOCK(&BLOCK))
IF &RECFM NE &BLANK THEN SET ©STR EQ &STR(©STR RECFM(&RECFM))
IF &ASCII EQ ASCII THEN SET ©STR EQ &STR(©STR ASCII)         
IKJEBCY1 &INDATASET &OUTDATASET ©STR                             
FREE DSN(&INDATASET &OUTDATASET)                                     
END                                                                   


The Help for this command is

Code:

FUNCTION-
  THE COPY COMMAND IS USED TO DUPLICATE A SEQUENTIAL OR
  PARTITIONED DATA SET OR A MEMBER OF A PARTITIONED DATA
  SET, TO ADD A MEMBER TO AN EXISTING PARTITIONED DATA SET,
  OR TO MERGE TWO PARTITIONED DATA SETS.

SYNTAX-
         COPY   'DSNAME1'  DSNAME2'
                RENUM('BEGIN INTEGER   INCREMENT')

                NUM('BEGIN COLUMN   FIELD LENGTH')
                               OR
                NONUM

                NUM2('BEGIN COLUMN  FIELD LENGTH')
                LRECL(RECORDSIZE)   BLOCK(BLOCKSIZE)
                RECFM(U/V/F/D)
                ASCII

  NOTE      - U MAY BE FOLLOWED BY T.
              V MAY BE FOLLOWED BY B/T/BT.
              F MAY BE FOLLOWED BY B/S/T/BS/BT/ST/BST.
              D MAY BE FOLLOWED BY B/BA.
              F V OR U MAY BE FOLLOWED BY AN A OR M.

  REQUIRED  - 'DSNAME1'  AND  'DSNAME2'

  DEFAULTS  - NONUM

OPERANDS-

 'DSNAME1'- THE DATA SET TO BE COPIED.
 'DSNAME2'- THE EXISTING OR NEW DATA SET WHICH IS TO RECEIVE
            THE COPY.
 LRECL(RECORDSIZE)
          - RECORDSIZE SPECIFIES THE MAXIMUM LENGTH IN BYTES OF A
            LOGICAL RECORD FOR DSNAME2.
 BLOCK(BLOCKSIZE)
          - BLOCKSIZE SPECIFIES THE BLOCKSIZE IN BYTES THAT YOU WANT
            TO USE FOR 'DSNAME2'.
 RENUM('BEGIN INTEGER  INCREMENT')
          - THE DATA SET IS TO BE RENUMBERED. 'BEGIN INTEGER' IS THE
            LINE NUMBER OF THE FIRST LINE. 'INCREMENT' IS THE AMOUNT
            EACH LINE NUMBER IS TO BE INCREASED.
 NUM('BEGIN COLUMN  FIELD LENGTH')
          - NUM INDICATES THE POSITION OF THE LINE NUMBER FIELD WITHIN
            A RECORD FOR DSNAME1.  'BEGIN COLUMN' SPECIFIES THE
            BEGINNING COLUMN OF THE LINE NUMBER FIELD.  'FIELD LENGTH'
            SPECIFIES THE LENGTH OF THE LINE NUMBER FIELD.
 NONUM
          - NONUM INDICATES THAT DATASET 'DSNAME1' HAS NO
            LINE NUMBER FIELD.
 NUM2('BEGIN COLUMN  INCREMENT')
          - NUM2 INDICATES THE POSITION OF THE LINE NUMBER FIELD WITHIN
            A RECORD FOR DSNAME2.  'BEGIN COLUMN' SPECIFIES THE
            BEGINNING COLUMN OF THE LINE NUMBER FIELD.  'FIELD LENGTH'
            SPECIFIES THE LENGTH OF THE LINE NUMBER FIELD.
 RECFM(U/V/F)
          - RECFM IS USED TO SPECIFY THE CHARACTERISTICS OF DATA SET
            RECORDS.  U,V,F,OR D MAY BE SPECIFIED, INDICATING THAT
            RECORDS ARE UNDEFINED, VARIABLE, FIXED LENGTH OR
            VARIABLE ASCII.  IN ADDITION U,V,F,OR D MAY BE FOLLOWED
            BY B,S,T,A OR M INDICATING THAT RECORDS ARE WRITTEN IN
            FIXED BLOCKS, STANDARD BLOCKS, USING THE TRACK OVERFLOW
            FEATURE OR HAVE ASCII OR MACHINE CONTROL CHARACTERS.
            VALID COMBINATIONS ARE AS FOLLOWS: UT,VB,VT,VBT,DB,DA,
            DBA,FB,FS,FT,FBS,FBT,FST,FBST.
 ASCII
          - ASCII SPECIFIES THAT TRANSLATION TO ASCII IS TO
            BE PERFORMED.




Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Fri Aug 20, 2004 9:19 am    Post subject: Reply with quote

I'm well puzzled by this now. I can't find this clist in my SYSPROC or SYSEXEC concatenation, but it works. No idea where it's coming from...
Back to top
View user's profile Send private message
Maton_Man
Beginner


Joined: 30 Jan 2004
Posts: 123
Topics: 0

PostPosted: Tue Oct 12, 2004 6:58 pm    Post subject: Reply with quote

I typed TSO HELP for a list of all commands and came up with the following:

<snip>
DATA MANAGEMENT COMMANDS:

ALLOCATE ALLOCATE A DATA SET WITH OR WITHOUT AN ATTRIBUTE
LIST OF DCB PARAMETERS.
ALTLIB DEFINE OPTIONAL, USER-LEVEL OR APPLICATION-LEVEL SETS OF
LIBRARIES CONTAINING SAA/PL EXECS OR CLISTS. THESE
LIBRARIES ARE SEARCHED WHEN IMPLICITLY INVOKING AN
SAA/PL EXEC OR CLIST.
ATTRIB ALLOW DCB PARAMETERS TO BE DYNAMICALLY INTRODUCED
AND NAMED FOR USE WITH A SUBSEQUENT ALLOCATE COMMAND.
CONVERT SIFT ITF/PL1 AND FORTRAN SOURCE.
COPY COPY A DATA SET. (SEE NOTE BELOW.)
DELETE DELETE A DATA SET.
EDIT CREATE, EDIT, AND/OR EXECUTE A DATA SET.
FORMAT FORMAT AND PRINT A TEXT DATA SET. (SEE NOTE BELOW.)
FREE RELEASE A DATA SET AND/OR AN ATTRIBUTE LIST.
LIST DISPLAY A DATA SET. (SEE NOTE BELOW.)
LISTALC DISPLAY ACTIVE DATA SETS.
LISTBC DISPLAY MESSAGES FROM OPERATOR/USER.
LISTCAT DISPLAY USER CATALOGUED DATA SETS.
LISTDS DISPLAY DATA SET ATTRIBUTES.
MERGE COMBINE DATA SETS. (SEE NOTE BELOW).
PRINTDS PRINT A DATA SET.
PROTECT PASSWORD PROTECT DATA SETS.
RENAME RENAME A DATA SET.
TSOLIB DEFINE OPTIONAL SEARCH LEVEL THAT TSO/E USES WHEN SEARCHING
FOR COMMANDS AND PROGRAMS.

NOTE: THE TSO DATA UTILITY COMMANDS, COPY, FORMAT, LIST AND MERGE,
ARE PART OF PROGRAM PRODUCT 5734-UT1. THIS PRODUCT MUST BE
INSTALLED PRIOR TO UTILIZING THE COMMANDS AND RELATED HELPS.

<snip>

Note the bits about the copy command.
_________________
My opinions are exactly that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group