how to move ps file



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

how to move ps file

Postby azeez » Wed Oct 27, 2010 6:10 pm

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
azeez
 
Posts: 1
Joined: Wed Oct 27, 2010 5:55 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to move ps file

 

Re: how to move ps file

Postby MrSpock » Wed Oct 27, 2010 6:29 pm

Just about any copy utility will work: IEBGENER, SORT, IDCAMS (REPRO), and in some cases, IEBUPDTE.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: how to move ps file

Postby steve-myers » Wed Oct 27, 2010 6:33 pm

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?
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: how to move ps file

Postby NicC » Wed Oct 27, 2010 6:45 pm

Suggest you look beyond just the editor in ISPF - look through the utility options - 3.x. And use PF1 - help
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: how to move ps file

Postby dick scherrer » Thu Oct 28, 2010 1:19 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: how to move ps file

Postby littlechicken » Thu Oct 28, 2010 2:57 pm

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.
littlechicken
 
Posts: 25
Joined: Thu Oct 28, 2010 10:15 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to move ps file

Postby steve-myers » Sun Oct 31, 2010 8:07 am

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.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: how to move ps file

Postby dick scherrer » Sun Oct 31, 2010 9:12 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post