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
 

 

Clist problem while writting muliple records in PS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
vsk_2407

New User


Joined: 20 Feb 2005
Posts: 3
Location: india

PostPosted: Mon Jun 14, 2010 5:19 pm    Post subject: Clist problem while writting muliple records in PS
Reply with quote

I'm trying to write multiple records into a PS. But I'm unable to do so. The record is being updated with the latest one.

Eg:

I want to write a PS as :

111111,111111,11111,11111,Y,ERD,Y
222222,111111,11111,11111,Y,ERD,Y

The record is written only once and the latest record is seen.The Code used by me is :

Code:

ALLOCATE FILE(TEST) DA('NUAEA62.APP.TEST(DUMMY)') SHR               
OPENFILE TEST OUTPUT             
ISPEXEC VGET (INP)                                                   
DO UNTIL &INP = Y                                                   
  SET TEST=&CONFIGID,&DELCUST,&DELADD,&ACTCUST,&ENCRY,+         
                   &REPTTYPE,&EXTRAC
    PUTFILE TEST           /* Write new value to data set */         
END                                                                 
CLOSFILE TEST                                                     
FREE F(TEST)
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Jun 14, 2010 6:00 pm    Post subject: Reply to: Clist problem while writting muliple records in PS
Reply with quote

I'm not a CLIST expert, but, first of all, your topic says that you want to write multiple records to a PS, yet your example shows the target dataset as a PDS.

You use the ISPF service ISPEXEC VGET (INP) outside of the loop. Shouldn't it be inside the loop? I can't see how it would be able to control the number of iterations of the loop if it's not checked each time.
Back to top
View user's profile Send private message
vsk_2407

New User


Joined: 20 Feb 2005
Posts: 3
Location: india

PostPosted: Mon Jun 14, 2010 6:28 pm    Post subject: Reply to: Clist problem while writting muliple records in PS
Reply with quote

I have tried that ISPF function inside the loop.Yet, same problem
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 14, 2010 6:29 pm    Post subject:
Reply with quote

Where do you populate the &INP that comes from the VGET.
Please show the code used.
Back to top
View user's profile Send private message
vsk_2407

New User


Joined: 20 Feb 2005
Posts: 3
Location: india

PostPosted: Mon Jun 14, 2010 6:33 pm    Post subject: Reply to: Clist problem while writting muliple records in PS
Reply with quote

It is populated in the Screen.The user provides that Input.

The Code for giving that input was provided earlier
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 14, 2010 6:37 pm    Post subject: Re: Reply to: Clist problem while writting muliple records i
Reply with quote

vsk_2407 wrote:
The Code for giving that input was provided earlier
Really, where.

Where is the code that that performs VPUT
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Jun 14, 2010 6:42 pm    Post subject: Reply to: Clist problem while writting muliple records in PS
Reply with quote

I think there are sections of the code not being shown, like where values for all of those variables like &CONFIGID, &DELCUST, &DELADD, &ACTCUST, &ENCRY, &REPTTYPE, and &EXTRAC are being set. This code almost looks like a sub-routine rather than a stand-alone program.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 14, 2010 6:52 pm    Post subject:
Reply with quote

I should imagine that the OP is doing multiple VPUTs somewhere and doesn't quite grasp the concept that each VPUT over writes the data stored by the previous VPUT.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Jun 14, 2010 7:07 pm    Post subject: Reply to: Clist problem while writting muliple records in PS
Reply with quote

I dunno. I feel pretty confident that, if you OPENFILE the file, perform multiple PUTFILE's, and then CLOSFILE it, they you'll have one record for each PUTFILE you called.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 14, 2010 7:11 pm    Post subject:
Reply with quote

Well, without ever seeing the pertinent pieces of code to know what's going on, there's not too much left to say.

I just went for a psychic day special with my guesstimate of multiple VPUTs.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 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