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 

FileAid include , exclude question
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Tue Apr 13, 2004 2:18 pm    Post subject: Reply with quote

Kolusu and Ravi,
Could you please show me how to fix this:
I want to drop record if colum 11 and 12 are: //,xx,**, or x/, I tried this way but it gave me condition code of 8. isn't it a correct way to do? If not could you please show me how to fix this.

Thanks a bunch!

Quote:


//SYSIN DD *
$$DD01 DROP IF=(1,0,C'7094 W'),
OR=(11,2,C'//'),
OR=(11,2,C'X/'),
OR=(11,2,C'**'),
OR=(11,2,C'XX'),OUT=0
/*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Apr 13, 2004 2:54 pm    Post subject: Reply with quote

nguyenh,

When you are searching/validating particular position in the file you don't have to specify the length.

Try the following control cards.

Code:
 
//SYSIN DD *
$$DD01 DROP IF=(1,0,C'7094 W'),OR=(11,EQ,C'//'),OR=(11,EQ,C'X/'),
            OR=(11,EQ,C'**'),OR=(11,EQ,C'XX'),OUT=0             


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
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Tue Apr 13, 2004 3:30 pm    Post subject: Reply with quote

kOLUSU,
After I posted, I look in file-aid and found the the solution just exactly as you, I got the return code 00. but somehow it didnt drop the records that I want it to drop: here is copy of my input file let see if you can identify my problem:
Quote:
OR=(location,EQ,C'**'),
I replaced "location" with 10, 11, 12... still didn't work.
Code:

----+----1----+----2----+----3----+----4----+----5----+----6
  15:33:28  IEF403I M2MVAL0G - STARTED - TIME=15.33.28
  15:37:03  IEF404I M2MVAL0G - ENDED - TIME=15.37.03
 //*MAIN  CLASS=MASTHIMS,LINES=(100,W),FAILURE=CANCEL
 //B103010.MESSAGE DD DSN=MAST2.&PAYLD..MSGQUE.V&MSN,DISP=(O
           //*MAIN  CLASS=MASTHIMS,LINES=(100,W),FAILURE=CAN
           XX* CREATE A TEMPORARY MESSAGE FILE THAT CONTAINS
           XX*            *************************  SYSTEM
           XX*            *************************  SYSTEM
           XX*            *************************  SYSTEM
           XX*            *************************  SYSTEM
        48 XXSYSOUT   DD  SYSOUT=&SYSMSG             SORT ME
           XX             REPORT='*',         ** ERROR REPOR
           XX             TSARPT='*',         ** ERROR REPOR
           XX*            *************************  SYSTEM



thanks!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Apr 13, 2004 4:20 pm    Post subject: Reply with quote

nguyenh,

The following is the output I get using the control cards I have shown above

Code:

----+----1----+----2----+----3----+----4----+----5----+----6       
15:33:28 IEF403I M2MVAL0G - STARTED - TIME=15.33.28                 
15:37:03 IEF404I M2MVAL0G - ENDED - TIME=15.37.03                   
//*MAIN CLASS=MASTHIMS,LINES=(100,W),FAILURE=CANCEL                 
//B103010.MESSAGE DD DSN=MAST2.&PAYLD..MSGQUE.V&MSN,DISP=(O         
//*MAIN CLASS=MASTHIMS,LINES=(100,W),FAILURE=CAN                   
XX* CREATE A TEMPORARY MESSAGE FILE THAT CONTAINS                   
48 XXSYSOUT DD SYSOUT=&SYSMSG SORT ME                               
XX REPORT='*', ** ERROR REPOR                                       
XX TSARPT='*', ** ERROR REPOR                                       


This is the Job I used
Code:

//STEP0100 EXEC PGM=FILEAID                                           
//SYSPRINT DD  SYSOUT=*                                               
//SYSLIST  DD  SYSOUT=*                                               
//DD01     DD  DSN=TEST.INPUT,DISP=SHR                       
//DD01O    DD  SYSOUT=*                                               
//SYSIN    DD *                                                       
$$DD01 DROP IF=(1,0,C'7094 W'),OR=(11,EQ,C'//'),OR=(11,EQ,C'X/'),     
            OR=(11,EQ,C'**'),OR=(11,EQ,C'XX'),OUT=0                   
/*


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
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Tue Apr 13, 2004 4:54 pm    Post subject: Reply with quote

kolusu,
I am so sorry about giving you the bad picture, somehow when I pasted the input data here it shift all those lines tarting with "//", "xx", "//*", "xx*" to colum 1, but they should be in colum 11, let me try to fix it now it should look like below:

Code:

----+----1----+----2----+----3----+----4----+----5-
        6 //STEP00 EXEC UTLMSGC
        7 XXUTLMSGC PROC SYSMSG='*',         ** SYS
          XX             RGN=2048K           ** PRO
          XX* * * * * * * * * * * * * * * * * * * *
          XX*
          XX*                           U T L M S G
          XX*
          XX* CREATE A TEMPORARY MESSAGE FILE THAT
          XX*
          XX*
          XX* * * * * * * * * * * * * * * * * * * *
        8 XXUTLMSGC  EXEC PGM=UTLMSGC,REGION=&RGN


I only need these lines to remained after execute the DROP:
Quote:

15:33:28 IEF403I M2MVAL0G - STARTED - TIME=15.33.28
15:37:03 IEF404I M2MVAL0G - ENDED - TIME=15.37.03


Anyways, I think your solution is very clear, I just don't understand why it didn't give me what I want.

I know i posted too many here, please feel free to delete any of my posts if you want to keep this forum clean.
Thank!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Apr 13, 2004 6:04 pm    Post subject: Reply with quote

nguyenh,

I edited your posts to put the code blocks. You are using quote blocks and that is the reason your data seems shifted. Click on the edit button on any of the posts and you will see how I used the code blocks.

I ran with the following input
Code:

----+----1----+----2----+----3----+----4----+----5----+----6             
  15:33:28  IEF403I M2MVAL0G - STARTED - TIME=15.33.28                   
  15:37:03  IEF404I M2MVAL0G - ENDED - TIME=15.37.03                     
//*MAIN  CLASS=MASTHIMS,LINES=(100,W),FAILURE=CANCEL                     
//B103010.MESSAGE DD DSN=MAST2.&PAYLD..MSGQUE.V&MSN,DISP=(O             
          //*MAIN  CLASS=MASTHIMS,LINES=(100,W),FAILURE=CAN             
          XX* CREATE A TEMPORARY MESSAGE FILE THAT CONTAINS             
          XX*            *************************  SYSTEM               
          XX*            *************************  SYSTEM               
          XX*            *************************  SYSTEM               
          XX*            *************************  SYSTEM               
        48XXSYSOUT   DD  SYSOUT=&SYSMSG             SORT ME             
          XX             REPORT='*',         ** ERROR REPOR             
          XX             TSARPT='*',         ** ERROR REPOR             
          XX*            *************************  SYSTEM               


And the following is the output from my run using the same control cards.
Code:

  15:33:28  IEF403I M2MVAL0G - STARTED - TIME=15.33.28       
  15:37:03  IEF404I M2MVAL0G - ENDED - TIME=15.37.03         
//*MAIN  CLASS=MASTHIMS,LINES=(100,W),FAILURE=CANCEL         
//B103010.MESSAGE DD DSN=MAST2.&PAYLD..MSGQUE.V&MSN,DISP=(O 


Now I really do not understand what is wrong with your JCl. Can you please post your JCl and I will take a look at it for any errors.

Kolusu

PS:Don't worry about the no: of posts. Hopefully all these posts should make you an expert in using File-aid and may be you can teach us 1 or 2 tips in future.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Apr 14, 2004 10:33 am    Post subject: Reply with quote

Kolusu,
Thanks for your tips, and helps here is a segment of my JCL, there are too many steps to post here, so I post just one: (SOME OF THESE LINES TYPED IN MYSELF SO THERE MAY BE TYPOS. I HOPE NOT)
I just emailed you my complete skeleton you may want to look at that instead this. Thank you very much
Code:

)SEL &S64YN1 = Y
//STEP01   EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=9
//SYSLIST  DD SYSOUT=9
//SYSTOTAL DD SYSOUT=9
//DD01     DD DSN=&S64IP1,
//             DISP=SHR
//DD01O   DD DSN=&&&&TEMP1,
//             LIKE=&S64IP1,
//             DISP=(NEW,PASS)
//SYSIN    DD *
$$DD01 DROP IF=(1,0,C'7094 W'),
            OR=(1,EQ,C'**'),
            OR=(11,EQ,C'**'),
            OR=(1,EQ,C'//'),
            OR=(11,EQ,C'//'),
            OR=(1,EQ,C'XX'),
            OR=(11,EQ,C'XX'),
            OR=(1,EQ,C'X/'),
            OR=(11,EQ,C'X/'),OUT=0
/*
 //STEP01A  EXEC PGM=FILEAID
 //SYSPRINT DD SYSOUT=9
 //SYSLIST  DD SYSOUT=9
 //SYSTOTAL DD SYSOUT=9
 //DD01     DD DSN=&&&&TEMP1,
 //            DISP=OLD
 //DD01O    DD SYSOUT=9
 //SYSIN    DD *
 $$DD01 COPY IF=(1,0,C' E '),
            AND=(-4,4,EQN),
            OR=(1,0,C' I '),
            AND=(-4,4,EQN),
            OR=(1,0,C' S '),
            AND=(-4,4,EQN),
            OR=(1,0,C' U '),
            AND=(-4,4,EQN),
            OR=(1,0,C' W '),
            AND=(-4,4,EQN),
            OR=(1,0,C' ENDED '),
            OR=(1,0,C'ABEND'),
            OR=(1,0,C'COND CODE'),
            OR=(1,0,C'ERROR'),
            OR=(1,0,C'FAIL'),
            OR=(1,0,C'INVALID'),
            OR=(1,0,C'MESSAGE'),
            OR=(1,0,C'NOT FOUND'),
            OR=(1,0,C'STARTED'),
            OR=(1,0,C'VALIDATION'),OUT=0
/*
//COPY01   EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=9
//SYSLIST  DD SYSOUT=9
//SYSTOTAL DD SYSOUT=9
//DD01     DD DSNAME=&S64IP1,
//         DISP=SHR
//DD01O    DD DISP=SHR,
//         DSN=&USERID..WRKFIL
//SYSIN    DD *
$$DD01 COPYALL
/*
//VM2VLL3  EXEC PGM=VM2VLL3,REGION=1224K
//IPFILE   DD DSNAME=&USERID..WRKFIL,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
//OPFILE   DD SYSOUT=*,
//         DCB=(RECFM=FB,LRECL=133)
//FILE80   DD *
&S64IP1
/*
)ENDSEL

Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 14, 2004 11:10 am    Post subject: Reply with quote

nguyenh,

I Just ran the step01 of your JCL with slight modifications. You have one to many &'s for the DD01O file.Also there is no space specification for the output file. The following is the JCL I ran.

Code:

//STEP01   EXEC PGM=FILEAID                                     
//SYSPRINT DD SYSOUT=*                                           
//SYSLIST  DD SYSOUT=*                                           
//SYSTOTAL DD SYSOUT=*                                           
//DD01     DD DSN=INPUT.FILE,
//             DISP=SHR                                         
//DD01O    DD DSN=&&TEMP1,                                       
//            DISP=(NEW,PASS),SPACE=(CYL,(1,1),RLSE),LIKE=INPUT.FILE             
//SYSIN    DD *                                                 
$$DD01 DROP IF=(1,0,C'7094 W'),                                 
            OR=(1,EQ,C'**'),                                     
            OR=(11,EQ,C'**'),                                   
            OR=(1,EQ,C'//'),                                     
            OR=(11,EQ,C'//'),                                   
            OR=(1,EQ,C'XX'),                                     
            OR=(11,EQ,C'XX'),                                   
            OR=(1,EQ,C'X/'),                                     
            OR=(11,EQ,C'X/'),OUT=0                               
/*                                                               


I am guessing that your input file is an FBA file which means that the actual data starts in pos 2 instead of pos 1. Pos 1 will have carriage control character.so that might cause the DROP condition to fail. Take a look at the SYSPRINT of step01 after the job completion and in there it gives you the characterstics of both input and output record.

Code:

DD01     DSN=INPUT.FILE OPENED AS PS,                       
             RECFM=FB,LRECL=123,BLKSIZE=123,VOL=DMASAR               
DD01O    DSN=SYS04105.T120320.RA000.TEMP1.H01 OPENED AS PS,
             RECFM=FB,LRECL=123,BLKSIZE=123,VOL=DTPS12               


If the recfm is either FBA then you need to change the positions by 1.

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
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Apr 14, 2004 11:22 am    Post subject: Reply with quote

Kolusu,
I tried to change it to position 2, and 12 instead of 1, and 11, but still no progress.
Plus my input and output file are both VBA here it is:
Code:

DD01     DSN=NSDC656.STS092.M2MVAL0G OPENED AS PS,
             RECFM=VBA,LRECL=138,BLKSIZE=27998,VOL=SMA309
DD01O    DSN=SYS04105.T110649.RA000.NSDC656A.TEMP1.H01 OPENED AS PS,
             RECFM=VBA,LRECL=138,BLKSIZE=27998,VOL=SMA30D


Quote:

You have one to many &'s for the DD01O file.Also there is no space specification for the output file.


I fix the code base on your sugesstion above but still no progress.
I have tried: OR=(1,EQ,C'**') and OR=(1,EQ,C'*,/,X'),

These would drop records that contains /, *, x BUT it may drops records that I dont want. what else could cause this problem Kolusu ?


Last edited by nguyenh on Wed Apr 14, 2004 12:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 14, 2004 11:47 am    Post subject: Reply with quote

nguyenh

Aha Your input file is VBA,that explains why the records are not dropped.For VBA files you need to take into account the RDW and the carriage control character. For VBA files your actual data starts from 6 instead of 1.

If you are checking for '**' in pos 1 then you actually need to check it in pos 6. so change your control cards

Code:

OR=(1,EQ,C'**')


to

Code:

OR=(6,EQ,C'**')


And similarly all other fields.

Check the following links for detailed explanation of the various recfm

Fixed-Length Records (Format F)

Variable-Length Records (Format V or D)

Undefined Records (Format U)

Spanned Records (Format S)

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
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Apr 14, 2004 1:13 pm    Post subject: Reply with quote

THAT'S IT KOLUSU,
It works great now, It takes me 2 days and found nothing and you just gave me the solution in minutes. Thank you very very much for your helps.
Back to top
View user's profile Send private message
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sat Apr 17, 2004 12:06 am    Post subject: Reply with quote

nguyenh ,

here's a tip that has saved me much time.

$$DD01 DUMP IN=250

This will dump the first 250 records of the file in hexadecimal format. You would have figured out your problem in 5 minutes.

(I used this often when I'm not sure of the file format).

have fun with File-Aid. I've been using it for 26+ years, its a great tool
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Mon May 03, 2004 4:44 pm    Post subject: Reply with quote

Thanks haatvedt!

I have another quick question:
Can someone please tell me what is different of using SYSOUT=9 and SYSOUT=* in the following segment of my code below:
My picky( how do you spell it?) co-worker questions me why this, why that, It made me mad, but I look around for explaination but no luck.
I am very dump about JCL Mainframe.
Thanks a bunch!


Code:

/*
//STEP01A  EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=9
//SYSLIST  DD SYSOUT=9 
//SYSTOTAL DD SYSOUT=9 
//DD01     DD DSN=&&&&TEMP1,
//            DISP=OLD
//DD01O    DD SYSOUT=9
//SYSIN    DD *
$$DD01 COPY IF=(1,0,C' E '),
            AND=(-4,4,EQN),
            OR=(1,0,C' I '),
            AND=(-4,4,EQN),
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon May 03, 2004 5:04 pm    Post subject: Reply with quote

nguyenh,


*,9 are baically output classes which are used list the output listing from the jobs. Each shop has their own standard of defining the output classes.

SYSOUT=* specifies that JES is to write the sysout data set to the device handling class in the JOB MSGCLASS parameter on the JOB statement.
SYSOUT=9 specifies that JES is to write the sysout data set to the device handling class 9 output

Check this link for a detailed explanation of the sysout parameter.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/12.59?DT=20030423085347

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
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed May 05, 2004 1:45 pm    Post subject: Reply with quote

Kolusu,
Yes, It definitely helped.
I found out that SYSOUT=9 specifies that the output will not be printed. That is our shop installation definition of '9'. SYSOUT=* specifies that the output will go to whatever is specified on the MSGCLASS= parm on the JOB statement.

Thank for your explaination, I feel like I have learned alot about Mainframe from you guys than anywhere else. eventhough comparing to you guys I am nobody...

Cheers,
Thanks again.
nguyenh
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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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