Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to Retrieve values from VB file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
suneelv

New User


Joined: 26 Aug 2008
Posts: 52
Location: inida

PostPosted: Wed Dec 17, 2008 11:04 am    Post subject: How to Retrieve values from VB file
Reply with quote

Hi,

I have a VB file with lenght of 4004. I want to retrieve one field which conains '11' length of 2 and it is defined as Binary.

how to retreive the binary field in the file.

Regards
Suneel
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Wed Dec 17, 2008 11:13 am    Post subject:
Reply with quote

suneelv,

Do you need to copy the entire record into output if it has the value '11'? Is the Output LRECL the same as that of input - 4004?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Dec 17, 2008 11:28 am    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Suneel,

Also should the records be selected if '11' is in a fixed positiion or in any position in the record?
Back to top
View user's profile Send private message
suneelv

New User


Joined: 26 Aug 2008
Posts: 52
Location: inida

PostPosted: Wed Dec 17, 2008 11:30 am    Post subject: Reply to: How to Retrieve Binary values from VB file
Reply with quote

Hi,

In that file there is one Binary field which contains '11' , i want to retrieve the records which contains '11'.

Regards
Suneel
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Dec 17, 2008 11:33 am    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Suneel,

Quote:
In that file there is one Binary field which contains '11' ,


Field positions have to be told icon_sad.gif . Please post all the details when you first post a question. It would save all our time.
Back to top
View user's profile Send private message
suneelv

New User


Joined: 26 Aug 2008
Posts: 52
Location: inida

PostPosted: Wed Dec 17, 2008 11:36 am    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Hi,

The fields position start from 3 and length of 2. In that position it contains '11' ,i want whole records which contains '11' and the output file also be in VB format.

Regards
Suneel
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Wed Dec 17, 2008 11:53 am    Post subject:
Reply with quote

suneelv,

You might try this SyncSort job. Goodluck icon_smile.gif
Code:
//STEP1    EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD DSN= Input file   
//SORTOUT  DD DSN= Output file 
//SYSIN    DD *                 
  OPTION COPY                   
  INCLUDE COND=(7,2,CH,EQ,C'11')
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Dec 17, 2008 12:10 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Arun,

From OP

Quote:
length of 2 and it is defined as Binary.


So will the same SORT card work when the field is defined as Binary?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Wed Dec 17, 2008 12:25 pm    Post subject:
Reply with quote

Aaru wrote:
So will the same SORT card work when the field is defined as Binary?
No. it will not work. I missed the binary part. icon_evil.gif It should have been
Code:
//SYSIN    DD *             
  OPTION COPY               
  INCLUDE COND=(7,2,BI,EQ,11)

Thanks for pointing out. icon_smile.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Dec 17, 2008 12:28 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Arun,

Quote:
Thanks for pointing out.


No probs Dude.
Back to top
View user's profile Send private message
suneelv

New User


Joined: 26 Aug 2008
Posts: 52
Location: inida

PostPosted: Wed Dec 17, 2008 12:33 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Hi All,

Its working fine.thanks a lot for your help.

Regards
Suneel
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Dec 17, 2008 12:33 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Hi,

For Binary field, the following may help you.

Code:

//STEP1    EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD DSN= Input file   
//SORTOUT  DD DSN= Output file 
//SYSIN    DD *                 
  OPTION COPY                   
  INCLUDE COND=(7,2,BI,ALL,X'F1F1')
/*


Here F1 is hexadecimal value of 1.

Regards
R KARTHIK
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Dec 17, 2008 12:36 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

HI,

Dont consider the above one. Try the below

Code:

//STEP1    EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD DSN= Input file   
//SORTOUT  DD DSN= Output file 
//SYSIN    DD *                 
  OPTION COPY                   
  INCLUDE COND=(7,2,BI,EQ,X'F1F1')
/*
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Dec 17, 2008 1:29 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Suneel,

Quote:
Its working fine.thanks a lot for your help.


Glad to know that its working fine.
Back to top
View user's profile Send private message
suneelv

New User


Joined: 26 Aug 2008
Posts: 52
Location: inida

PostPosted: Wed Dec 17, 2008 4:51 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Hi,

In this one only i want to check for '1' value alos where it present in position 5 and length of 2.

i have used

OPTION COPY
INCLUDE COND=((7,2,BI,EQ,11,OR,1)

i got the syntax error. please help me to retrieve 11 and 1 in starting position 3 and length of 2.

regards
suneel
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Wed Dec 17, 2008 5:02 pm    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

The Syntax should be

OPTION COPY
INCLUDE COND=(7,2,BI,EQ,11,OR,
6,1,BI,EQ,1)

Here I mentioned 6 instead of 5 because binary field is right justified.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Wed Dec 17, 2008 9:41 pm    Post subject:
Reply with quote

Quote:
i want to check for '1' value alos where it present in position 5 and length of 2.
Quote:
please help me to retrieve 11 and 1 in starting position 3 and length of 2.
Suneel,

Which one is correct?
Back to top
View user's profile Send private message
suneelv

New User


Joined: 26 Aug 2008
Posts: 52
Location: inida

PostPosted: Thu Dec 18, 2008 9:55 am    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Hi

The below one is working

OPTION COPY
INCLUDE COND=(7,2,BI,EQ,11,OR,
7,2,BI,EQ,1)
.

The value 1 also starting from position 3 and length of 2.

Thanks for all your help.

Regards
Suneel
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 18, 2008 10:02 am    Post subject: Reply to: How to Retrieve values from VB file
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Dec 18, 2008 2:35 pm    Post subject:
Reply with quote

Quote:
OPTION COPY
INCLUDE COND=((7,2,BI,EQ,11,OR,1)


try
Code:
OPTION COPY
INCLUDE COND=(7,2,BI,EQ,11,OR,7,2,BI,EQ,1)


Garry
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us