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
 

 

JCL SORT CARD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Fri Sep 27, 2013 7:40 pm    Post subject: JCL SORT CARD
Reply with quote

Hello

I need to create a sort card where in my input files are having data like below.

sftp> ls -1
file1.zip
file2.zip
sftp> QUIT


I want the output file to contain as many as GET command as the number of zip files are present input file. Provided output file should look like as below-

Get file1.zip /path1
Get file2.zip /path2

Now if the input file contain 3 files the number of GET command sould be 3.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Sep 27, 2013 8:10 pm    Post subject: Reply to: JCL SORT CARD
Reply with quote

Use INCLUDE with SS to do a substring search for .zip.

The you can use a literal for the Get, and whatever magic you need for the /path.

I doubt that ftp will mind about any trailing blanks, but if you want it to look neater you can give it a bit of a SQZ afterwards.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Fri Sep 27, 2013 8:19 pm    Post subject:
Reply with quote

For the path actually i would like to see them as below over unix mainframe.

Get file1.zip /path/file1.zip
Get file2.zip /path/file2.zip
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Sep 27, 2013 9:09 pm    Post subject:
Reply with quote

Hello,

If the output path is constant, just insert it as a literal when writing your output.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Sep 27, 2013 9:36 pm    Post subject: Reply to: JCL SORT CARD
Reply with quote

You'll need to know the maximum lengths of the fielname and pathname. You will then have to SQZ to make a valid filename including the path.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Fri Sep 27, 2013 9:41 pm    Post subject:
Reply with quote

Thanks Dick, thanks Bill .

Let me check, I will get back agaun.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Mon Sep 30, 2013 7:34 pm    Post subject:
Reply with quote

Hey Dick , hey Bill,

SQZ worked well for me. thanks
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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