IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Changing the control of a program from onevariableto another


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
akumaras

New User


Joined: 06 Jul 2012
Posts: 10
Location: india

PostPosted: Wed Jan 30, 2013 2:00 pm
Reply with quote

Hi,

I have two input files with two variables A & B so my requirement is when ever it is A then that needs to be converted to B and then read the values of B and while writing it should write the same value to A.

So is it possible to change the control to B so that it can read the complete record of B and write the same to A?

Regards,
akumaras
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 30, 2013 2:08 pm
Reply with quote

clear as mud

if You want good answers, learn to ask CLEAR questions icon_cool.gif
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jan 30, 2013 2:17 pm
Reply with quote

Looks like Encrypt Decrypt algorithm icon_biggrin.gif

I would just wanted to add on to what Enrico said

Please explain your requirement better with some values within codetag
Back to top
View user's profile Send private message
akumaras

New User


Joined: 06 Jul 2012
Posts: 10
Location: india

PostPosted: Wed Jan 30, 2013 3:33 pm
Reply with quote

Sorry guys for not giving the complete info...Please find the requirement below

IF VEND = 12345
MOVE 88888 TO VEND
PERFORM READ FILE2
ELSE
MOVE VEND TO VEND1
READ FILE2
The problem i am facing is when passing the 88888 to vend,program is trying to read the values for vend 12345 only. So my requirement is after moving 88888 to vend then program needs to read the values of 88888 vend only. And while writing it should write the same values to vend 12345.Please help me in this and let me know if i am not clear on this.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jan 30, 2013 4:33 pm
Reply with quote

Why not have a temp variable?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 30, 2013 4:49 pm
Reply with quote

Are you doing a keyed read, but not changing the value in the key which is equivalent to the value in VEND?
Back to top
View user's profile Send private message
akumaras

New User


Joined: 06 Jul 2012
Posts: 10
Location: india

PostPosted: Wed Jan 30, 2013 5:17 pm
Reply with quote

Its a keyed read only and vend is a part of key. So the key will be changed when vend is changed
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 30, 2013 6:17 pm
Reply with quote

So you need to add your new key and, if that is what you want, delete your old one.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts changing defaults in db2 admin - Unlo... DB2 0
Search our Forums:

Back to Top