Page 1 of 1

how to move ps file

PostPosted: Wed Oct 27, 2010 6:10 pm
by azeez
hai this is azeez and i am the begineer to the mainframes will u plz tel me how to move the ps file into pds file

Re: how to move ps file

PostPosted: Wed Oct 27, 2010 6:29 pm
by MrSpock
Just about any copy utility will work: IEBGENER, SORT, IDCAMS (REPRO), and in some cases, IEBUPDTE.

Re: how to move ps file

PostPosted: Wed Oct 27, 2010 6:33 pm
by steve-myers
First of all, be sure you understand the terminology. In the mainframe world, when you "move" a data set you are deleting the source. In addition, unlike the MOVE command in a Windows command screen, when you "move" a data set or a member of a PDS, you actually copy the data as part of the "move." In Windows, "move" is an alias for a fancy rename.

Second, do you want to do this in batch, using JCL and utility programs, or do you want to do this "move" in line mode TSO, or in ISPF in TSO?

Re: how to move ps file

PostPosted: Wed Oct 27, 2010 6:45 pm
by NicC
Suggest you look beyond just the editor in ISPF - look through the utility options - 3.x. And use PF1 - help

Re: how to move ps file

PostPosted: Thu Oct 28, 2010 1:19 am
by dick scherrer
Hello and welcome to the forum,

plz tel me how to move the ps file into pds file
What does "move" mean to you for this question?

Does the pds already exist? Does the pds have the same lrecl as the ps file? How will the member name for the pds "output" be determined?

What you want to do is probably completely clear to you, but it has not been clearly posted.

If you explain more about what you are trying to accomplish, someone may have a suggestion.

Re: how to move ps file

PostPosted: Thu Oct 28, 2010 2:57 pm
by littlechicken
ps = QSAM hence DSORG=PS I asssume then.

I think the solution provided above you need to state TSO or BATCH then someone mioght be able to help you more.

Re: how to move ps file

PostPosted: Sun Oct 31, 2010 8:07 am
by steve-myers
Azeez - if you learn nothing else about mainframes, learn this:
  • JCL does nothing. It provides a framework that allows a user to specify a program to execute, and the data the program can use. This is not like Unix, where there is no JCL, there are only commands (where each command is a program). The commands specify the data the command is to use.
  • As others have indicated, there are a number of methods to perform the task you propose.
  • MVS does not use term "file" to refer to a named data area as does Unix and other popular systems. MVS uses the term "data set" to refer to a named data area. In MVS, the term "file" refers to a data area on magnetic tape.
  • Avoid the use of PS. PS is MVS jargon that is the data set organization code for a sequential data set. Those of us that attempt to respond to these requests know (or should know) what you mean. Others may not know what you mean.
The job that follows is one method to "move" a data set to a member of a partitioned data set. It is not the only method. It probably is not the "best" method.
//A       EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//INPUT    DD  DISP=OLD,DSNAME=input-ds
//OUTPUT   DD  DISP=OLD,DSNAME=output-ds(member)
//SYSIN    DD  *
  REPRO INFILE(INPUT) OUTFILE(OUTPUT)
  DELETE input-ds NONVSAM
  • The DD statements with DD names INPUT and OUTPUT specify DISP=OLD.
    • The INPUT DD statement specifies DISP=OLD so that job has exclusive control of the input data set. This ensures that the IDCAMS DELETE command will work since it requires that the job have exclusive control of the data set it is to delete.
    • The OUTPUT DD statement specifies DISP=OLD so that the job has exclusive control of the output data set. This prevents another job from adding a member at the same time your job is adding a member.
  • The DELETE command will execute even if the REPRO command fails. There are methods you can use in IDCAMS to make execution of the DELETE command conditional, which you can discover for yourself.

Re: how to move ps file

PostPosted: Sun Oct 31, 2010 9:12 am
by dick scherrer
Hello,

Until you are much more familiar with the environment and the various tools (utilities, jcl, tso/ispf, etc), suggest you create (or have someone create) all new files to use for experimenting.

If you destroy or corrupt something that is actually used by other people (let alone production processes) the reaction from management/instructor/others will be anywhere from unkind to rather severe. . .