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
 

 

Copy a VSAM file to PS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
karthikbabudh

New User


Joined: 08 Sep 2003
Posts: 32
Location: Toronto <-> Bangalore

PostPosted: Thu Feb 23, 2006 9:26 pm    Post subject: Copy a VSAM file to PS
Reply with quote

Hi All,

Can anyone help me to how to copy data from vsam to sequential file after masking some data depending upon certain contains.

babu.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Feb 23, 2006 10:02 pm    Post subject:
Reply with quote

Quote:
after masking some data depending upon certain contains.


You need to give the details of what exactly you're trying to do.
Back to top
View user's profile Send private message
karthikbabudh

New User


Joined: 08 Sep 2003
Posts: 32
Location: Toronto <-> Bangalore

PostPosted: Thu Feb 23, 2006 10:22 pm    Post subject: Re: Copy a VSAM file to PS
Reply with quote

Hi,

I need to write a cobol pgm to read a vsam file and write data to a PS after masking some data depending upon certain contains.

eg :

INPUT FILE:
empidempnameaddress
00000nnnnnnnnaaaaaaa

if the empid is greater than 77777 then empname should be masked to 'zzzzzzzz'

OUTPUT FILE

empidempnameaddress
77777zzzzzzzzaaaaaaa

Regards,
Karthik.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Feb 23, 2006 11:49 pm    Post subject:
Reply with quote

Well, I can't help you with a COBOL program (you might have better luck with that in a COBOL Forum). but if doing this with DFSORT is an option for you, I can show you how to do that.
Back to top
View user's profile Send private message
karthikbabudh

New User


Joined: 08 Sep 2003
Posts: 32
Location: Toronto <-> Bangalore

PostPosted: Fri Feb 24, 2006 12:25 am    Post subject:
Reply with quote

Hi Frank,

Can u send me the DFSORT commands.may be usefull for me.

Regards,
Karthik.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 24, 2006 12:31 am    Post subject:
Reply with quote

Here's a DFSORT job to do what you asked for, assuming you want to treat the VSAM file as variable length:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   VSAM input file
//SORTOUT DD DSN=...  output file (VB)
//SYSIN DD *
   OPTION COPY
   RECORD TYPE=V
   INREC IFTHEN=(WHEN=(5,5,ZD,GT,+77777),
     OVERLAY=(10:C'zzzzzzzz'))
/*


If you can treat the VSAM file as fixed length, you can use this version of the job:

Code:

//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   VSAM input file
//SORTOUT DD DSN=...  output file (FB)
//SYSIN DD *
   OPTION COPY
   RECORD TYPE=F
   INREC IFTHEN=(WHEN=(1,5,ZD,GT,+77777),
     OVERLAY=(6:C'zzzzzzzz'))
/*
Back to top
View user's profile Send private message
vishal_a

New User


Joined: 24 May 2005
Posts: 45
Location: Noida

PostPosted: Fri Feb 24, 2006 12:45 am    Post subject: Re: Copy a VSAM file to PS
Reply with quote

Thanks frank

Well it solved my problem also...

great

vishal
Back to top
View user's profile Send private message
karthikbabudh

New User


Joined: 08 Sep 2003
Posts: 32
Location: Toronto <-> Bangalore

PostPosted: Fri Feb 24, 2006 2:25 am    Post subject:
Reply with quote

Thanks a lot frank

Regards,
Karthik.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 24, 2006 2:42 am    Post subject:
Reply with quote

Glad I could help.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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