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 

how to copy data to another dataset

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Sun Jan 23, 2005 6:15 am    Post subject: how to copy data to another dataset Reply with quote

hi

I have ps file with 1lakh 18000 records. I want to copy data in it from the position having value 118900008 and position 11 to 19.

pls. help me out.


thanks in advance
nadh
Back to top
View user's profile Send private message Send e-mail
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Sun Jan 23, 2005 6:20 pm    Post subject: Reply with quote

I'd use a SELCOPY solution, like this:

Code:

READ INFILE
IF POS 11 = 118900008
THEN GOTO COPY
ELSE GOTO GET

COPY
WRITE OUTFILE
READ INFILE
IF EOF
THEN EOJ
ELSE GOTO COPY


CA-Easytrieve is probably pretty easy, too, but I don't know it.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jan 24, 2005 9:07 am    Post subject: Reply with quote

Nadh,

Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.

Quote:

I have ps file with 1lakh 18000 records. I want to copy data in it from the position having value 118900008 and position 11 to 19.


Do you want to copy all the records from the file which have 118900008 at position 11 ?

If that is so then the following JCL will give you the desired results.

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//SORTOUT  DD DSN=YOUR OUTPUT FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
  SORT FIELDS=COPY
  INCLUDE COND=(11,9,CH,EQ,C'118900008')
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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