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 records from backwards

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Mon Oct 01, 2007 4:36 am    Post subject: Copy records from backwards Reply with quote

When i try to copy records backwards using file-aid.I am getting error.

Code:
//ISDXM81A JOB (7003),'FILEAID SCAN ',MSGCLASS=X,           
//         USER=ISDXM81,CLASS=E,TIME=(,50),NOTIFY=ISDXM81   
//*                                                         
//PSTY0010 EXEC CA11RMS,TYPRUN=F                             
//PSTY0020 EXEC PGM=FILEAID,PARM=TSO                         
//SYSLIST  DD SYSOUT=*                                       
//SYSPRINT DD SYSOUT=*                                       
//*YSTOTAL DD SYSOUT=*                                       
//DD01     DD DSN=ISDXM81.JCLLIB(IN1),DISP=SHR               
//DD01O    DD DSN=ISDXM81.TEST.FILE.AID,                     
//           DISP=(NEW,CATLG,DELETE),                       
//           SPACE=(TRK,(1,1),RLSE),                         
//           RECFM=FB,LRECL=80,BLKSIZE=27920                 
//SYSIN    DD *                                             
$$DD01 COPYBACK OUT=2                                       
/*                                               



i am getting maxcc=8
and the message iam getting is

Code:
           F I L E - A I D  V8.9.5          RELEASE DATE 02/27/06               
DD01     DSN=ISDXM81.JCLLIB(IN1) OPENED AS PS(BACKWARD),                       
             RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=DEV019                         
DD01O    DSN=ISDXM81.TEST.FILE.AID OPENED AS PS,                               
             RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=DEV024                         
$$DD01 COPYBACK OUT=2                                                           
ABOVE FUNCTION ENDED ON EMPTY DATA SET                                   RC=8   
                                                                               
0 RECORDS WRITTEN TO DD01O-ISDXM81.TEST.FILE.AID                               
                       VOL=DEV024                                               
                                                                               



could any one help me


Thanks,
Siva
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Mon Oct 01, 2007 5:10 am    Post subject: Reply with quote

"ABOVE FUNCTION ENDED ON EMPTY DATA SET RC=8"
Doesn't the above kind of give you a hint of the problem?
Back to top
View user's profile Send private message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Mon Oct 01, 2007 5:27 am    Post subject: Reply with quote

No i want to copy the last 2 records from input file into new output.
Is this will not happen in FILEAID
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Oct 01, 2007 6:10 am    Post subject: Reply with quote

sivafdms,

bonk As per the error messages your input file is EMPTY. So there are no records to copy and fileaid default return code for empty datasets is 8.


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


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

PostPosted: Mon Oct 01, 2007 9:10 am    Post subject: Reply with quote

Welcome back, Kolusu.

Hope you enjoyed your holiday, and your batteries are recharged.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed Oct 03, 2007 4:08 am    Post subject: Reply with quote

Hi kolsu,

I tried this and found that when i was trying use the i/p it was deleted by other job.
Finally it worked.

Thanks & Regards,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sat Oct 06, 2007 9:18 am    Post subject: Reply with quote

Mervyn wrote:
Welcome back, Kolusu.

Hope you enjoyed your holiday, and your batteries are recharged.


Mervyn,

nah I am still on vacation. 8) 8)

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


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Sat Oct 06, 2007 11:50 am    Post subject: Reply with quote

kolusu wrote:
Mervyn wrote:
Welcome back, Kolusu.

Hope you enjoyed your holiday, and your batteries are recharged.


Mervyn,

nah I am still on vacation. 8) 8)

Kolusu


Kolusu,
You are visiting and helping out buddies here even if you are on vacation....Great!!!!
Back to top
View user's profile Send private message Send e-mail
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Fri Oct 26, 2007 4:04 am    Post subject: Reply with quote

I am not able to copy the records backwards..

F I L E - A I D V8.9.5 RELEASE DATE 02/27/06
DD01 DSN=ISDXM81.JCLLIB(COPY) OPENED AS PS(BACKWARD),
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=DEV019
DD01O DSN=ISDXM81.ISDXM81A.JOB34020.D0000107.? OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=SYSOUT
$$DD01 COPYBACK OUT=2
ABOVE FUNCTION ENDED ON EMPTY DATA SET RC=8

0 RECORDS WRITTEN TO DD01O-ISDXM81.ISDXM81A.JOB34020.D0000107.?
VOL=

Even though i am having four records in the file
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
VIEW ISDXM81.JCLLIB(COPY) - 01.00 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 SIVA
000002 RAMA
000003 AIZAZ
000004 SREEE
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Fri Oct 26, 2007 4:40 am    Post subject: Reply with quote

sivafdms,

Quote:

Hi kolsu,

I tried this and found that when i was trying use the i/p it was deleted by other job.
Finally it worked.

Thanks & Regards,
Siva


Just wondering .. Y it had worked earlier and not it throws an error.
Can you post the whole job so that we can have a look at that?

Try giving the input as instream than in a dataset and post the error messages if any.
_________________
Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Back to top
View user's profile Send private message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Fri Oct 26, 2007 6:09 am    Post subject: Reply with quote

My Jcl is below...

//ISDXM81A JOB (7003),'FILEAID SCAN ',MSGCLASS=X,
// USER=ISDXM81,CLASS=E,TIME=(,50),NOTIFY=ISDXM81
//*
//PSTY0010 EXEC CA11RMS,TYPRUN=F
//PSTY0020 EXEC PGM=FILEAID,PARM=TSO
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DD01 DD *
SIVA
RAMA
VINAY
AIZAZ
/*
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 COPYBACK OUT=2
/*
//


but it giving that dataset is empty

Thanks & Regards,
Siva kumar
Back to top
View user's profile Send private message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Fri Oct 26, 2007 8:35 am    Post subject: Reply with quote

sivafdms,

Quote:

//DD01 DD DSN=ISDXM81.JCLLIB(IN1),DISP=SHR


I tried giving the input in PS. and it worked!!! Dont know the reason.
Copy the input to a flat file and give that in the DD01 statement. It will work.
I am not sure Y it is not working when given as a member of a PDS.
_________________
Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Oct 26, 2007 12:48 pm    Post subject: Reply with quote

sivafdms wrote:
I am not able to copy the records backwards..

F I L E - A I D V8.9.5 RELEASE DATE 02/27/06
DD01 DSN=ISDXM81.JCLLIB(COPY) OPENED AS PS(BACKWARD),
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=DEV019
DD01O DSN=ISDXM81.ISDXM81A.JOB34020.D0000107.? OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=SYSOUT
$$DD01 COPYBACK OUT=2
ABOVE FUNCTION ENDED ON EMPTY DATA SET RC=8

0 RECORDS WRITTEN TO DD01O-ISDXM81.ISDXM81A.JOB34020.D0000107.?
VOL=

Even though i am having four records in the file
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
VIEW ISDXM81.JCLLIB(COPY) - 01.00 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 SIVA
000002 RAMA
000003 AIZAZ
000004 SREEE
****** **************************** Bottom of Data ****************************


Your error message says empty file - did you save it before running the job?
The job you show has your input (DD01) as DD * not a dataset.

Make your mind up which is correct and post the correct information.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
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 -> Utilities 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