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
 

 

Writing file output command - Pls Help

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

New User


Joined: 13 Dec 2007
Posts: 11
Location: USA, California

PostPosted: Sat Oct 09, 2010 4:25 am    Post subject: Writing file output command - Pls Help
Reply with quote

Hi,

In my program, am using the the dataset for multiple entries. So the dataset is in 'MOD' 'REUSE'. The write format is not what i was expecting.
Please find the code below.

"ALLOC F(OUTDD1) NEW DSORG(PS) REC(F B) LR(80) BLK(27920)",
"SPACE(10,10) TRACKS DSNAME('"OUTDS"')"
"ALLOC F(OUTDD1) DA('"OUTDS"') MOD REUSE" ;
PUSH IN_DT
"EXECIO" 1 "DISKW OUTDD1"
"EXECIO" 0 "DISKW OUTDD1 (FINIS"
"FREE F(OUTDD1)"

IN_DT = UID' 'EXHH' 'EHH' 'EXPCN' 'EPCN' 'EXTMSTP' 'ETMSTP

The output of the above code will be like this.

USR001 11111 2222 3333 4444 55555 66666
USR002 11111 2222 3333 4444 55555 66666
USR003 11111 2222 3333 4444 55555 66666

But i want the program to write the record in different format. The sample format is shown below.
USR001
11111
2222
3333
4444
55555
66666
USR002
11111
2222
3333
4444
55555
66666

Please help me in solving this. Thanks for your time.

[/img]
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Sat Oct 09, 2010 5:31 am    Post subject: Reply to: Writing file output command - Pls Help
Reply with quote

I'm not following what difference it makes how your output dataset is allocated. You need to initiate multiple writes, i.e.:

PUSH UID
"EXECIO 1 DISKW OUTDD1"
PUSH EXHH
"EXECIO 1 DISKW OUTDD1"
PUSH EHH
"EXECIO 1 DISKW OUTDD1"
PUSH EXPCN
"EXECIO 1 DISKW OUTDD1"
PUSH EPCN
"EXECIO 1 DISKW OUTDD1"
PUSH EXTMSTP
"EXECIO 1 DISKW OUTDD1"
PUSH ETMSTP
"EXECIO 1 DISKW OUTDD1"
...

or

QUEUE UID
QUEUE EXHH
QUEUE EHH
QUEUE EXPCN
QUEUE EPCN
QUEUE EXTMSTP
QUEUE ETMSTP
"EXECIO " QUEUED()" DISKW OUTDD1"
...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10275
Location: italy

PostPosted: Sat Oct 09, 2010 12:46 pm    Post subject: Reply to: Writing file output command - Pls Help
Reply with quote

the output is consistent with Your coding

You queued a record built by string juxtaposition

if You want things in seperate records build each record accordingly
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2051
Location: Silicon Valley

PostPosted: Sat Oct 09, 2010 9:39 pm    Post subject: Reply to: Writing file output command - Pls Help
Reply with quote

Quote:
build each record accordingly

Each time you PUSH builds a new record.
Back to top
View user's profile Send private message
janaonline

New User


Joined: 13 Dec 2007
Posts: 11
Location: USA, California

PostPosted: Sat Oct 23, 2010 12:29 am    Post subject:
Reply with quote

Thanks for all your guidance. I solved the issue by multiple writes..
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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 4 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
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


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