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
 

 

Update the parm using REXX

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

New User


Joined: 24 Oct 2008
Posts: 16
Location: Bangalore

PostPosted: Tue Feb 03, 2009 4:08 pm    Post subject: Update the parm using REXX
Reply with quote

I Have a Connect:Direct parm
Code:

SIGNON                                       
SUBMIT PROC=GCFIEW1D                         
 &DSN1=GEWVPGE.EI11.V823.ET8A.EZD230.SE       
 &DSN2=ET8ADTE                               
 &CASE=YES                                   
SIGNOFF                                       

I have to read the file of DSN1 and Update the parm DSN2 value with header of DSN1

Ex: GEWVPGE.EI11.V823.ET8A.EZD230.SE having below date

000ET8ADTE_S01_001_11072008.DTL-->Header
501001810600015010010100000001
501001810300015010010100000001
501001810600015010010100000001
501001810300015010010100000001
501001810600015010010100000591
501001810300015010010100000591

So I have to read the file of DSN1 and Update the Parm with Header.

so my parm should be change
Code:
 
SIGNON                                       
SUBMIT PROC=GCFIEW1D                         
 &DSN1=GEWVPGE.EI11.V823.ET8A.EZD230.SE       
 &DSN2=ET8ADTE_S01_001_11072008.DTL                               
 &CASE=YES                                   
SIGNOFF         



I wrote the below REXX exec:
Code:

/*REXX*/                                           
   INPS1="'GEWVPGE.EI11.V823.ET8A.EZD230.SE  '"-->DSN1                 
   INPS2="'UEWDVQ4.EI11.V823.ET5S.SE1'"            -->tempfile
 ADDRESS TSO "ALLOC DA("INPS1")F(INDD1) SHR REUSE"
 "EXECIO 1 DISKR INDD1(FINIS STEM INREC."         
 "FREE FI(INDD1)"                                 
 "END"                                             
DO I = 1 TO INREC.0       
          OUT.O = INREC.I
          O = 0 + 1       
    SAY INREC.I             
  XXX = INREC.I           
 SAY 'XXX' XXX           
 ET8ADTE=Substr(XXX,4,28)
 ET8AMBS=SUbstr(XXX,4,28)
 ET8BDDE=SUbstr(XXX,4,28)
DO I = 1 TO INREC.0                           
    OUTREC = ''                               
       OLDPATH = INREC.I                     
    SELECT                                   
    WHEN POS('ET8ADTE',XXX) ¬= 0 THEN DO     
       NEWPATH = ET8ADTE                     
    END                                       
    WHEN POS('ET8AMBS',XXX) ¬= 0 THEN DO     
       NEWPATH = ET8AMBS                     
    END                                       
    WHEN POS('ET8BDDE',XXX) ¬= 0 THEN DO     
       NEWPATH = ET8BDDE                     
    END                                       
       OTHERWISE DO                   
          SAY 'LAST' INREC.I         
       END                           
       END                           
   END                               

     ADDRESS TSO "ALLOC DA("INPS2")F(OUTDD) SHR REUSE"     
"EXECIO 1 DISKW OUTDD(FINIS STEM INREC."                   
"FREE FI(OUTDD)"                                           
"END"                                                     

with code am updating the Temp file but that not effecting in Parm value.

can you please help me?

Thanks,
vijay
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: Tue Feb 03, 2009 4:23 pm    Post subject:
Reply with quote

Where are you writing to the parm file ?
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: Tue Feb 03, 2009 4:40 pm    Post subject:
Reply with quote

Does this help ?
Code:

/* REXX *** OVERLAY PARM & REWRITE            */
PFILE = "NAME OF PARM FILE"                     
DFILE = "NAME OF DATA FILE"                     
"FREE FI(IPARM,IDATA)"                         
"ALLOC FI(IPARM) DA('"PFILE"') SHR"             
"ALLOC FI(IDATA) DA('"DFILE"') SHR"             
"EXECIO * DISKR PFILE (STEM PIN. FINIS"         
"EXECIO 1 DISKR DFILE (STEM DIN. FINIS"         
WANTED = SUBSTR(DIN.1,4,28)                     
DO AA = 1 TO PIN.0                             
  IF AA = 4 THEN DO                             
    PIN.AA = OVERLAY(WANTED,PIN.AA,7,28)       
  END                                           
  QUEUE PIN.AA                                 
END                                             
"EXECIO" QUEUED() "DISKW PFILE ( FINIS"         
"FREE FI(IPARM,IDATA)"                         
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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